Added make scripts, some new tests, install link now points to greasyfork

This commit is contained in:
MrFry 2020-03-22 14:46:20 +01:00
parent 0c5ab62a5c
commit 8ef64e1a54
10 changed files with 277 additions and 12 deletions

42
make.sh Executable file
View file

@ -0,0 +1,42 @@
#!/bin/bash
git pull
git submodule update --init --recursive
echo "Installing node modules for server"
npm install
echo "Making qmining page"
pushd modules/qmining/qmining-page/
npm install
npm run export
popd
ln -sf "$PWD/modules/qmining/qmining-page/out" "$PWD/modules/qmining/public"
echo "mkdir-ing/touching :3"
# TODO: make server create these itself
mkdir stats
touch nolog
#JSONS
echo '{}' > stats/stats
echo '{}' > stats/vstats
echo '{}' > stats/idstats
echo '{}' > stats/idvstats
touch public/version
touch public/motd
echo "wgetting data.json from frylabs..."
wget "http://qmining.frylabs.net/data.json" -O ./public/data.json
if [ "$?" -ne "0" ]; then
echo "Failed to wget data.json, please create it yourself!"
echo "Now starting with empty data!"
echo '{"Subjects":[],"version":"TESET","motd":"hai"}' > ./public/data.json
fi
echo "Done!"
echo "npm start {loglevel}"
echo "To start server"