Created
April 13, 2022 07:43
-
-
Save papadave66/501ed37765e0c0200e3519d45be2988e to your computer and use it in GitHub Desktop.
Setup server script for Minecraft modpack "Crucial 2"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ -n "$JAVA_HOME" ] && JAVA="$JAVA_HOME/bin/java" || JAVA=java | |
set -e | |
if [ -f forge-installer.jar ]; then | |
echo forge-installer.jar is present, which indicates the pack is already installed. | |
echo Delete forge-installer.jar if you intended to install or if the previous installation stopped halfway. | |
read -p "Press ENTER to continue..." answer | |
exit 0 | |
fi | |
[ -d mods ] || mkdir mods || exit | |
echo Downloading modpack files... | |
ORIG_IFS="$IFS" | |
IFS=, | |
while read line; do | |
set -- $line | |
[ $# != 2 ] && continue | |
wget --continue "$1" -O "${2%^M}" | |
done < mods.csv | |
IFS="$ORIG_IFS" | |
echo Installing server... | |
$JAVA -jar forge-installer.jar --installServer | |
read -p "Press ENTER to continue..." answer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment