fix: Corrected removal of neoforge jars and old server files zips when updating.
This commit is contained in:
parent
7f31fd3934
commit
5e4613a6f3
1 changed files with 3 additions and 3 deletions
|
|
@ -14,10 +14,10 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! [[ -f "Server-Files-$SERVER_VERSION.zip" ]]; then
|
if ! [[ -f "Server-Files-$SERVER_VERSION.zip" ]]; then
|
||||||
rm -fr config defaultconfigs kubejs mods packmenu Simple.zip forge*
|
rm -fr config defaultconfigs kubejs mods packmenu Server-Files-* neoforge*
|
||||||
curl -Lo "Server-Files-$SERVER_VERSION.zip" 'https://edge.forgecdn.net/files/6116/912/ServerFiles-2.28.zip' || exit 9
|
curl -Lo "Server-Files-$SERVER_VERSION.zip" "https://edge.forgecdn.net/files/6116/912/ServerFiles-$SERVER_VERSION.zip" || exit 9
|
||||||
unzip -u -o "Server-Files-$SERVER_VERSION.zip" -d /data
|
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
|
if [[ $(find . -type d -maxdepth 1 | wc -l) -gt 1 ]]; then
|
||||||
cd "${DIR_TEST}"
|
cd "${DIR_TEST}"
|
||||||
find . -type d -exec chmod 777 {} +
|
find . -type d -exec chmod 777 {} +
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue