Skip to content

Instantly share code, notes, and snippets.

@papadave66
Created April 13, 2022 07:43
Show Gist options
  • Save papadave66/501ed37765e0c0200e3519d45be2988e to your computer and use it in GitHub Desktop.
Save papadave66/501ed37765e0c0200e3519d45be2988e to your computer and use it in GitHub Desktop.
Setup server script for Minecraft modpack "Crucial 2"
[ -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