-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun.sh
executable file
·38 lines (33 loc) · 1.03 KB
/
run.sh
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
34
35
36
37
38
#!/bin/bash
source scripts/util.sh # does set +e; provides 'has_flag' and 'resolved_args'
# Allow for using binaries in node_modules/:
export PATH="`pwd`/node_modules/.bin/:$PATH"
if has_flag "--help" || [ "$1" = "" ] ; then
echo "Usage: Use one or more of the following
--client-hosted:
Open web page from server over localhost.
--client:
Open locally built web page in browser.
--server:
Start server on localhost.
--native_client:
Run native test client."
exit
fi
######################################################
# RUN SECTION
######################################################
if has_flag "--server" ; then
node build/server/loader.js
elif has_flag "--client" ; then
#electron build/client/ui-test-loader.js index
electron build/client/ui-test-loader.js board
elif has_flag "--client-hosted" ; then
google-chrome --disable-web-security http://localhost:8081/index.html
elif has_flag "--test" ; then
pushd build/
mocha
popd
else
electron build/client/ui-test-loader.js $1
fi