-
Notifications
You must be signed in to change notification settings - Fork 3
/
Tools.sh
executable file
·60 lines (48 loc) · 943 Bytes
/
Tools.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
#!/bin/bash
hi() {
echo "hi"
}
build() {
cd client
yarn
yarn build
cd ..
cd server
./build.sh
cd ..
}
serve() {
system=""
case $(uname -s) in
Linux*) system=linux;;
Darwin*) system=darwin;;
*) system=windows;;
esac
architecture=""
case $(uname -m) in
i386) architecture="386" ;;
i686) architecture="386" ;;
x86_64) architecture="amd64" ;;
arm*) architecture=$(uname -m) ;;
esac
executable_target_path="$(pwd)/server/binary/LocalShow_${system}_${architecture}"
echo '\n'
echo "Run the following command:\n${executable_target_path} <Your media folder>'"
}
before_docker_process() {
build
}
if [ "$1" == "hi" ]; then
hi
elif [ "$1" == "build" ]; then
build
elif [ "$1" == "serve" ]; then
serve
elif [ "$1" == ]; then
echo "
hi
build
serve
before_docker_process
"
fi