-
Notifications
You must be signed in to change notification settings - Fork 154
/
Copy pathinstall
executable file
·46 lines (35 loc) · 1.25 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
#!/bin/bash
mkdir bin
chmod +x *
export MAIN_DIR=$PWD
echo "Which Server do you want to install?"
echo "Type [1] Java Server"
echo "Type [2] Bedrock Server"
choiceForServer=1
read choiceForServer
# Installing Java 16 JDK and playit
#wget -q "https://download.oracle.com/java/17/archive/jdk-17.0.3_linux-x64_bin.tar.gz" -O bin/java.tar.xz
wget -q "https://download.java.net/java/GA/jdk17.0.1/2a2082e5a09d4267845be086888add4f/12/GPL/openjdk-17.0.1_linux-x64_bin.tar.gz" -O bin/java.tar.xz
cd $MAIN_DIR/bin
echo "> Extracting Java JDK 16 to the bin/ folder. [THIS MAY TAKE SOME TIME] Replace it if you want to use older version of JAVA."
tar -xf java.tar.xz && mv "jdk-17.0.1" java_bins
cd $MAIN_DIR
# If choice is 0 or null then run this command
if [[ -z $choiceForServer ]]; then
echo "> Invaild Respond. Please try again."
./install
# If choice is 1 then run this command
elif [[ $choiceForServer == 1 ]]; then
echo "> Running Java Installation..."
./installJava
# If choice is 1 then run this command
elif [[ $choiceForServer == 2 ]]; then
echo "> Running Bedrock Installation..."
./installBedrock
else
echo "> Invaild Respond. Please try again."
./install
fi
echo "> Installing AFK(Away From Keyboard) Script "
python3 -m pip install bpytop
echo ""