Merge pull request #29 from AtromixCode/bugfix/updating-server-version-fix

fix: Added removal of neoforge jars and old server files zips when updating.

with 2.29 update
This commit is contained in:
W3LFARe 2025-01-25 22:04:36 -05:00 committed by GitHub
commit d89c72dcb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,10 +14,10 @@ else
fi
if ! [[ -f "Server-Files-$SERVER_VERSION.zip" ]]; then
rm -fr config defaultconfigs kubejs mods packmenu Simple.zip forge*
curl -Lo "Server-Files-$SERVER_VERSION.zip" 'https://edge.forgecdn.net/files/6122/30/Server-Files-2.29.zip' || exit 9
rm -fr config defaultconfigs kubejs mods packmenu Server-Files-* neoforge*
curl -Lo "Server-Files-$SERVER_VERSION.zip" "https://edge.forgecdn.net/files/6122/030/ServerFiles-$SERVER_VERSION.zip" || exit 9
unzip -u -o "Server-Files-$SERVER_VERSION.zip" -d /data
DIR_TEST=$(find . -type d -maxdepth 1 | tail -1 | sed 's/^.\{2\}//g')
DIR_TEST="ServerFiles-$SERVER_VERSION"
if [[ $(find . -type d -maxdepth 1 | wc -l) -gt 1 ]]; then
cd "${DIR_TEST}"
find . -type d -exec chmod 777 {} +