mirror of
https://gitlab.com/MrFry/mrfrys-node-server
synced 2025-04-01 20:24:18 +02:00
even more setup script improvements
This commit is contained in:
parent
bd848c843f
commit
28b1c5b5da
1 changed files with 15 additions and 6 deletions
|
@ -1,6 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
baseDir=$(pwd)
|
baseDir=$(pwd)
|
||||||
|
domainPath="./data/domain"
|
||||||
|
|
||||||
hr() { [ -t 0 ] && printf '\033[0;32m%*s\033[0m\n' "$(tput cols)" '' | tr ' ' '='; }
|
hr() { [ -t 0 ] && printf '\033[0;32m%*s\033[0m\n' "$(tput cols)" '' | tr ' ' '='; }
|
||||||
|
|
||||||
|
@ -30,16 +31,17 @@ makeNextSubmodule() {
|
||||||
}
|
}
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
# Git submodules
|
# Checking if we are ready to go
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
log 'Updating / Cloning project'
|
|
||||||
|
|
||||||
checkFile "$PWD/src/server.ts"
|
checkFile "$PWD/src/server.ts"
|
||||||
checkFile "$PWD/package.json"
|
checkFile "$PWD/package.json"
|
||||||
checkFile "$PWD/package-lock.json"
|
checkFile "$PWD/package-lock.json"
|
||||||
|
if [ ! -f "${domainPath}" ]; then
|
||||||
git pull || exit
|
echo -e "\033[0;41m${domainPath} does not exist!\033[0m"
|
||||||
git submodule update --init --recursive || exit
|
echo "Please create it, and re-run this script."
|
||||||
|
echo "Expected content: domain, ex.:'frylabs.net' (without http:// and /)"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
# Creating directory structure
|
# Creating directory structure
|
||||||
|
@ -55,6 +57,13 @@ mkdir -p publicDirs/qminingPublic
|
||||||
|
|
||||||
touch publicDirs/qminingPublic/motd
|
touch publicDirs/qminingPublic/motd
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------------
|
||||||
|
# Git submodules
|
||||||
|
# ------------------------------------------------------------------------------------
|
||||||
|
log 'Updating / Cloning project'
|
||||||
|
git pull || exit
|
||||||
|
git submodule update --init --recursive || exit
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
# DB-s
|
# DB-s
|
||||||
# ------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue