forked from shaunph/CourseProject
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunserver.sh
More file actions
executable file
·33 lines (29 loc) · 765 Bytes
/
runserver.sh
File metadata and controls
executable file
·33 lines (29 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash
# A script to start the server in a UNIX environment.
# Usage: ./runserver.sh <port>
# OR: ./runserver.sh --clean
# To start the server without using this script, use:
# $ node js/dispatcher.js <port>
# (src MUST be the working directory)
if [ $# -ne 1 ]
then
echo "Usage: $0 --clean"
echo "OR $0 <port>"
exit 1
fi
cd src
if [ $1 == "--clean" ]
then
echo "removing src/db/ and node-sqlite build files..."
rm -v -rf db
rm -v lib/node-sqlite/sqlite3_bindings.node
rm -v -rf lib/node-sqlite/build
rm -v -rf lib/node-sqlite/deps/mpool-2.1.0/*.a
rm -v -rf lib/node-sqlite/deps/mpool-2.1.0/*.o
rm -v lib/node-sqlite/.lock-wscript
else
cd ..
./initbuild.sh
cd src
node js/dispatcher.js $1
fi