-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
install
executable file
·53 lines (41 loc) · 1.41 KB
/
install
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
#!/bin/bash
pip3=`which pip3`
if [ "x$pip3" == "x" ] ; then
echo PIP3 not installed. Please install it first, then re-run this script.
exit 1
fi
stat=`which stat`
if [ "x$stat" == "x" ] ; then
echo stat command not installed. Please install it first, then re-run this script.
exit 1
fi
OFS=`stat --printf="%s" install`
BaseDir="/home/JackrabbitRelay2"
cd /home/GitHub/JackrabbitRelay
mkdir -p $BaseDir > /dev/null 2>&1
git pull https://github.com/rapmd73/JackrabbitRelay
cp * /home/JackrabbitRelay2 > /dev/null 2>&1
/home/GitHub/JackrabbitRelay/UpdatePlaceOrder
# Do NOT copy the Config folder
mkdir -p $BaseDir/Config > /dev/null 2>&1
for d in Base Base/Library Data Extras Logs Ledger ; do
mkdir -p $BaseDir/$d > /dev/null 2>&1
cp -r /home/GitHub/JackrabbitRelay/$d/* $BaseDir/$d > /dev/null 2>&1
done
if [ x$1 != 'xnopull' ] ; then
python3 -m pip install --upgrade pip --break-system-packages
for i in `cat requirements.txt` ; do
# --break-system-packages
$pip3 install -U $i --break-system-packages
done
for i in $BaseDir/Data/*.symbolmap ; do
N=`echo $i | cut -d/ -f5 | cut -d. -f1`
A=`echo $i | cut -d/ -f5 | cut -d. -f2`
$BaseDir/Extras/TV2Exchange $N $A
done
fi
NFS=`stat --printf="%s" /home/GitHub/JackrabbitRelay/install`
if [ "$NFS" != "$OFS" ] ; then
echo Running update again...
/home/GitHub/JackrabbitRelay/install nopull
fi