platform/pods/workspace/download-init-scripts.sh
Andrey Sobolev 419a3ddfdb
UBERF-9633: Reduce migration calls during workspace creation (#8242) (#8244)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
2025-03-17 17:44:24 +07:00

14 lines
475 B
Bash
Executable File

#!/usr/bin/env bash
export INIT_SCRIPTS_BRANCH=${INIT_SCRIPTS_BRANCH:-unified-init-scripts}
# Download init repository
# Check if the file already exists
if [ -e "${INIT_SCRIPTS_BRANCH}.zip" ]; then
echo "File ${INIT_SCRIPTS_BRANCH}.zip already exists, skipping download"
else
wget https://github.com/hcengineering/init/archive/refs/heads/${INIT_SCRIPTS_BRANCH}.zip
fi
unzip ${INIT_SCRIPTS_BRANCH}.zip -d ./temp
mv temp/init-${INIT_SCRIPTS_BRANCH} ./init
rm -rf ./temp