-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall_1.sh
59 lines (56 loc) · 1.46 KB
/
install_1.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
# This scripts perform installation of required dependencies on termux
#!/bin/bash
# Install nodejs
pkg install nodejs-lts -y
if [ $? -eq 0 ]; then
echo "Installation successful"
else
echo "Failed to install nodejs. Exiting"
exit 1
fi
wget https://github.com/jtvserver/jtvserver.github.io/releases/download/1.1/JTVServer.zip
if [ $? -eq 0 ]; then
echo "Downloaded the server successfully. "
else
echo "Failed to download the server. Is wget installed?"
exit 1
fi
unzip JTVServer.zip
if [ $? -eq 0 ]; then
echo "File unzipped"
else
echo "Failed to unzip the file"
exit 1
fi
rm JTVServer.zip
if [ $? -eq 0 ]; then
echo "Deleted source"
else
echo "Failed to delete the source"
fi
cd JTVServer
rm package-lock.json
if [ $? -eq 0 ]; then
echo "Opened source"
else
echo "Failed to open source. Is the directory present ? Exiting"
exit 1
fi
echo "Installing dependencies"
npm install chalk dotenv crypto-js express http-proxy node-fetch
if [ $? -eq 0 ]; then
echo "Dependencies installation successful."
else
echo "Failed to install dependencies. Exiting"
exit 1
fi
echo "Downloading start server script"
cd ~
wget https://github.com/jtvserver/jtvserver.github.io/releases/download/1.1/start.sh
if [ $? -eq 0 ]; then
echo "Script downloaded successfully"
else
echo "Failed to download start script. Please run wget https://github.com/jtvserver/jtvserver.github.io/releases/download/1.0/start.sh to download"
exit 1
fi
cd ~