Commit 8459c825 authored by TurtleIdiot's avatar TurtleIdiot Committed by Melledy
Browse files

Added choice between stable and dev branch

Added a prompt to choose between downloading stable and development after the package manager validation and before the final confirmation prompt
parent 2b799958
...@@ -38,11 +38,27 @@ valid_ip() { ...@@ -38,11 +38,27 @@ valid_ip() {
# Checks for supported installer(s) (only apt-get for now :(, might add pacman in the future) # Checks for supported installer(s) (only apt-get for now :(, might add pacman in the future)
if is_command apt-get ; then if is_command apt-get ; then
echo -e "Supported package manager found\n" echo -e "Supported package manager found\n"
elif is_command pacman
else else
echo "No supported package manager found" echo "No supported package manager found"
exit exit
fi fi
BRANCH="stable" # Stable by default
# Allows choice between stable and dev branch
echo "Please select the branch you wish to install"
echo -e "!!NOTE!!: stable is the recommended brach.\ndevelopment is not guaranteed to work.\nUnless you have a reason to use development, pick stable"
select branch in "stable" "development" ; do
case $branch in
stable )
BRANCH="stable"
break;;
development )
BRANCH="development"
break;;
esac
done
INSTALLER_DEPS="curl wget openssl unzip git" INSTALLER_DEPS="curl wget openssl unzip git"
GC_DEPS="mongodb openjdk-17-jre" GC_DEPS="mongodb openjdk-17-jre"
...@@ -74,7 +90,7 @@ echo "Done" ...@@ -74,7 +90,7 @@ echo "Done"
echo "Getting grasscutter..." echo "Getting grasscutter..."
# Download and rename jar # Download and rename jar
wget -q --show-progress https://nightly.link/Grasscutters/Grasscutter/workflows/build/stable/Grasscutter.zip wget -q --show-progress "https://nightly.link/Grasscutters/Grasscutter/workflows/build/$BRANCH/Grasscutter.zip"
unzip -qq Grasscutter.zip unzip -qq Grasscutter.zip
mv $(find -name "grasscutter*.jar" -type f) grasscutter.jar mv $(find -name "grasscutter*.jar" -type f) grasscutter.jar
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment