mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-27 00:19:36 -05:00
d7fafb92b7
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
40 lines
975 B
Bash
Executable File
40 lines
975 B
Bash
Executable File
#!/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.
|
|
|
|
###### script header ######
|
|
|
|
lib=$(realpath @@BASE_LIB@@) || exit 1
|
|
stat "${lib}" >> /dev/null || exit 1
|
|
|
|
# shellcheck source=../sh/lib.bash
|
|
if ! source "${lib}"; then
|
|
echo "Error: could not find import"
|
|
exit 1
|
|
fi
|
|
|
|
bootstrapper=$(realpath @@BOOTSTRAPPER@@)
|
|
stat "${bootstrapper}" >> /dev/null
|
|
upgrade_agent=$(realpath @@UPGRADE_AGENT@@)
|
|
stat "${upgrade_agent}" >> /dev/null
|
|
cli=$(realpath @@CLI@@)
|
|
stat "${cli}" >> /dev/null
|
|
cdbg=$(realpath @@CDBG@@)
|
|
stat "${cdbg}" >> /dev/null
|
|
|
|
cd "${BUILD_WORKING_DIRECTORY}"
|
|
|
|
###### script body ######
|
|
|
|
if [[ $# -eq 0 ]]; then
|
|
workdir="."
|
|
else
|
|
workdir="$1"
|
|
fi
|
|
|
|
ln -sf "${bootstrapper}" "${workdir}/bootstrapper"
|
|
ln -sf "${upgrade_agent}" "${workdir}/upgrade-agent"
|
|
ln -sf "${cli}" "${workdir}/constellation"
|
|
ln -sf "${cdbg}" "${workdir}/cdbg"
|