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
|
||||
|
||||
baseDir=$(pwd)
|
||||
domainPath="./data/domain"
|
||||
|
||||
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/package.json"
|
||||
checkFile "$PWD/package-lock.json"
|
||||
|
||||
git pull || exit
|
||||
git submodule update --init --recursive || exit
|
||||
if [ ! -f "${domainPath}" ]; then
|
||||
echo -e "\033[0;41m${domainPath} does not exist!\033[0m"
|
||||
echo "Please create it, and re-run this script."
|
||||
echo "Expected content: domain, ex.:'frylabs.net' (without http:// and /)"
|
||||
exit
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------------
|
||||
# Creating directory structure
|
||||
|
@ -55,6 +57,13 @@ mkdir -p publicDirs/qminingPublic
|
|||
|
||||
touch publicDirs/qminingPublic/motd
|
||||
|
||||
# ------------------------------------------------------------------------------------
|
||||
# Git submodules
|
||||
# ------------------------------------------------------------------------------------
|
||||
log 'Updating / Cloning project'
|
||||
git pull || exit
|
||||
git submodule update --init --recursive || exit
|
||||
|
||||
# ------------------------------------------------------------------------------------
|
||||
# DB-s
|
||||
# ------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue