2023-03-14 08:57:39 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# This script is run from the user's Constellation workspace (BUILD_WORKING_DIRECTORY).
|
|
|
|
# It prepares the workspace by symlinking all required binaries into folder.
|
|
|
|
|
|
|
|
lib=$(realpath @@BASE_LIB@@) || exit 1
|
|
|
|
bootstrapper=$(realpath @@BOOTSTRAPPER@@) || exit 1
|
|
|
|
upgrade_agent=$(realpath @@UPGRADE_AGENT@@) || exit 1
|
|
|
|
cli=$(realpath @@CLI@@) || exit 1
|
|
|
|
cdbg=$(realpath @@CDBG@@) || exit 1
|
|
|
|
|
2023-03-16 09:24:53 -04:00
|
|
|
# shellcheck source=../sh/lib.bash
|
2023-03-14 08:57:39 -04:00
|
|
|
if ! source "${lib}"; then
|
|
|
|
echo "Error: could not find import"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
cd "${BUILD_WORKING_DIRECTORY}" || exit 1
|
|
|
|
|
2023-03-14 09:37:58 -04:00
|
|
|
if [[ $# -eq 0 ]]; then
|
|
|
|
workdir="."
|
2023-03-14 08:57:39 -04:00
|
|
|
else
|
2023-03-14 09:37:58 -04:00
|
|
|
workdir="$1"
|
2023-03-14 08:57:39 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
ln -sf "${bootstrapper}" "${workdir}/bootstrapper"
|
|
|
|
ln -sf "${upgrade_agent}" "${workdir}/upgrade-agent"
|
|
|
|
ln -sf "${cli}" "${workdir}/constellation"
|
|
|
|
ln -sf "${cdbg}" "${workdir}/cdbg"
|