Docker fixes

This commit is contained in:
mrfry 2021-08-01 13:52:53 +02:00
parent 8c784e2472
commit 2eb6bb9a49
5 changed files with 36 additions and 11 deletions

28
scripts/setup.sh Executable file
View file

@ -0,0 +1,28 @@
#!/bin/bash
hr() {
printf '\033[0;32m%*s\033[0m\n' "$(tput cols)" '' | tr ' ' '='
}
log() {
hr
echo -e "\033[0;32m${@}\033[0m"
hr
}
checkFile() {
if [ ! -f "$@" ]; then
log "$@ does not exists, exiting"
exit
fi
}
log 'Updating / Cloning project'
checkFile "$PWD/src/server.ts"
checkFile "$PWD/package.json"
checkFile "$PWD/package-lock.json"
git pull
git submodule update --init --recursive