mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
28 lines
418 B
Bash
Executable file
28 lines
418 B
Bash
Executable file
#!/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
|
|
|