This repository has been archived by the owner on Apr 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathGraphQLlaucher.sh
executable file
·89 lines (78 loc) · 1.63 KB
/
GraphQLlaucher.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
79
80
81
82
83
84
85
86
87
88
89
#!/bin/bash
usage() { echo -e "Usage: $0 [-s <install or skip>] [-d <small or big>] [-k <true or false>] \
\n -s for install -d for data -k for keep-alive" 1>&2; exit 1; }
while getopts ":s:d:k:" o; do
case "${o}" in
s)
s=${OPTARG}
((s == "install" || s == skip)) || usage
;;
d)
d=${OPTARG}
((d == "small" || d == "big")) || usage
;;
k)
k=${OPTARG}
((k == "true" || d == "false")) || usage
;;
i)
i=${OPTARG}
;;
t)
t=${OPTARG}
;;
*)
usage
;;
esac
done
shift $((OPTIND-1))
if [ -z "${s}" ] || [ -z "${k}" ]; then
usage
fi
cd GraphQLvsgRPC/GraphQL
if [ $s == "install" ]
then
npm install
sudo pip install -r ../../requirements.txt
elif [ $s == "skip" ]
then
echo ""
else
echo "that was not a correct argument"
fi
if [ $k == "true" ]
then
continue;
elif [ $k == "false" ]
then
if [ $d == "small" ]
then
node index.js &
python3 plot.py
exit
elif [ $d == "big" ]
then
node indexbigdata.js &
python3 plotbigdata.py
exit
else
echo "that was not a correct argument"
fi
else
echo "that was not a correct argument"
fi
if [ $d == "small" ]
then
node index.js &
node client.js
python3 plotfile.py
elif [ $d == "big" ]
then
node indexbigdata.js &
node clientbigdata.js
python3 plotfilebigdata.py
else
echo "that was not a correct argument"
fi
cd