aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Harris <ben@tilde.team>2019-03-03 17:13:24 -0500
committerBen Harris <ben@tilde.team>2019-03-03 17:23:55 -0500
commitee85dfe5ab6b3c7a5161fa2079e79a286e40c1ac (patch)
tree9e4e13f608de13b8f335ce2cadf7f7e8c3970ce4
parent5c708b436bf26a17bb40bf71304bc1f0164730e7 (diff)
downloadbbj-ee85dfe5ab6b3c7a5161fa2079e79a286e40c1ac.tar.gz
fix up if's in setup.sh
-rwxr-xr-xsetup.sh17
1 files changed, 13 insertions, 4 deletions
diff --git a/setup.sh b/setup.sh
index e3b1fc1..496940f 100755
--- a/setup.sh
+++ b/setup.sh
@@ -15,20 +15,29 @@ It takes the following flags:
You can optionally pass a different python interpreter to use (such as
a virtual environment), with no arguments this will use the system python3
+
EOF
exit;;
+
--dbset )
sqlite3 data.sqlite < schema.sql
- echo cleared
+ echo cleared
chmod 600 data.sqlite
- exit;;
+ exit;;
esac
-PYTHON=`which python3`
[[ -e logs ]] || mkdir logs; mkdir logs/exceptions
+
+PYTHON=`which python3`
[[ -z $1 ]] || PYTHON=$1
echo Using $PYTHON...
$PYTHON -m pip install ${DEPS[*]}
+
echo "Enter [i] to initialize a new database"
read CLEAR
-[[ $CLEAR == "i" ]] && sqlite3 data.sqlite < schema.sql; chmod 600 data.sqlite
+
+if [[ $CLEAR == "i" ]]; then
+ sqlite3 data.sqlite < schema.sql
+ chmod 600 data.sqlite
+fi
+
Un proyecto texto-plano.xyz