-
Notifications
You must be signed in to change notification settings - Fork 23
/
restart.sh
executable file
·78 lines (78 loc) · 2.77 KB
/
restart.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#!/bin/bash
npm install
if [ -d "src/server/lib" ] && [ -f "src/server/lib/glassfish-4-1.zip.partaa" ] &&
[ -f "src/server/lib/glassfish-4-1.zip.partab" ] &&
[ -f "src/server/lib/glassfish-4-1.zip.partac" ] &&
[ -f "src/server/lib/glassfish-4-1.zip.partad" ] &&
[ -f "src/server/lib/glassfish-4-1.zip.partae" ] &&
[ -f "src/server/lib/glassfish-4-1.zip.partaf" ] &&
[ -f "src/server/lib/glassfish-4-1.zip.partag" ] &&
[ ! -d "src/server/lib/glassfish4" ]; then
cd src/server/lib/
./installNC.sh
cd ../../..
fi
if [ -d "src/server/ext" ] && [ ! -d "src/server/ext/IVY" ] &&
[ -f "src/server/ext/IVY.zip.partaa" ] &&
[ -f "src/server/ext/IVY.zip.partab" ] &&
[ -f "src/server/ext/IVY.zip.partac" ]; then
cd src/server/ext/
./installIVY.sh
cd ../../..
fi
if [ -d "PVS" ] && [ -f "PVS/pvs" ] && [ -f "PVS/pvsio" ] && [ -f "PVS/proveit" ]; then
PVS_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )/PVS"
echo "PVS installation found at $PVS_DIR"
if [ -d "PVS/nasalib" ]; then
NASALIB_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )/PVS/nasalib"
echo "NASA LIB found at $NASALIB_DIR"
export PVS_LIBRARY_PATH=$NASALIB_DIR
cd PVS/nasalib
./install-scripts
cd ../..
else
cd PVS
bin/relocate
cd ..
fi
cd src/server
node pvssocketserver.js pvsdir:$PVS_DIR restart
elif [ -f "../pvs" ] && [ -f "../pvsio" ] && [ -f "../proveit" ]; then
PVS_DIR=${PWD%/*}
pvsioweb_DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
echo "PVS installation found at $PVS_DIR"
if [ -d "$PVS_DIR/nasalib" ]; then
NASALIB_DIR="$PVS_DIR/nasalib"
echo "NASA LIB found at $NASALIB_DIR"
export PVS_LIBRARY_PATH=$NASALIB_DIR
cd $PVS_DIR/nasalib
./install-scripts
cd $pvsioweb_DIR
else
cd $PVS_DIR
bin/relocate
cd $pvsioweb_DIR
fi
cd src/server
node pvssocketserver.js pvsdir:$PVS_DIR restart
else
pvsio -version
if [ $? -eq 0 ]; then
cd src/server
node pvssocketserver.js restart
else
#FAIL
echo "================================================================"
echo "================================================================"
echo "==== ERROR: Failed to locate PVS executable files ===="
echo "================================================================"
echo "==== Please install PVSio-web within the PVS folder ===="
echo "==== or alternatively place the PVS executable files on ===="
echo "==== your PATH (see README.md for installation details). ===="
echo "================================================================"
echo "================================================================"
#start in any case the UI, this is useful for developing additional PVSio-web UI components even without PVS
cd src/server
node pvssocketserver.js restart
fi
fi