fixes issues with moving out existing resource packs to backup folder (#362)
This commit is contained in:
1 parent
db8546ef25
commit
5872c76682
1 file changed
+9
-5
+9
-5
@@ -129,12 +129,16 @@ if [ ! -f "bedrock_server-${VERSION}" ]; then
|
|||||||
bkupDir=backup-pre-${VERSION}
|
bkupDir=backup-pre-${VERSION}
|
||||||
# fixup any previous interrupted upgrades
|
# fixup any previous interrupted upgrades
|
||||||
rm -rf "${bkupDir}"
|
rm -rf "${bkupDir}"
|
||||||
for d in behavior_packs definitions minecraftpe resource_packs structures treatments world_templates
|
for d in behavior_packs definitions minecraftpe resource_packs structures treatments world_templates; do
|
||||||
do
|
if [[ -d $d && -n "$(ls $d)" ]]; then
|
||||||
if [ -d $d ]; then
|
mkdir -p $bkupDir/$d
|
||||||
mkdir -p $bkupDir
|
|
||||||
echo "Backing up $d into $bkupDir"
|
echo "Backing up $d into $bkupDir"
|
||||||
mv $d $bkupDir
|
if [[ "$d" == "resource_packs" ]]; then
|
||||||
|
mv $d/{chemistry,vanilla} $bkupDir/
|
||||||
|
[[ -n "$(ls $d)" ]] && cp -a $d/* $bkupDir/
|
||||||
|
else
|
||||||
|
mv $d/* $bkupDir/
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user