Added option REMOVE_OLD_MODS

This commit is contained in:
Lukáš Černý
2017-07-02 01:32:24 +02:00
parent e1531c3237
commit deb98268f6
2 changed files with 20 additions and 0 deletions

View File

@@ -403,9 +403,15 @@ case "X$MODPACK" in
echo " from $MODPACK ..."
curl -sSL -o /tmp/modpack.zip "$MODPACK"
if [ "$TYPE" = "SPIGOT" ]; then
if [ "$REMOVE_OLD_MODS" = "TRUE" ]; then
rm -rf /data/plugins/*
fi
mkdir -p /data/plugins
unzip -o -d /data/plugins /tmp/modpack.zip
else
if [ "$REMOVE_OLD_MODS" = "TRUE" ]; then
rm -rf /data/mods/*
fi
mkdir -p /data/mods
unzip -o -d /data/mods /tmp/modpack.zip
fi