Skip to content

Commit c7219c6

Browse files
committed
Changed upgrade backup to be placed in /tmp to avoid build-up
#150
1 parent 0c4a78f commit c7219c6

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bedrock-entry.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ if [ ! -f "bedrock_server-${VERSION}" ]; then
8585
# remove only binaries and some docs, to allow for an upgrade of those
8686
rm -rf bedrock_server *.so release-notes.txt bedrock_server_how_to.html valid_known_packs.json premium_cache 2> /dev/null
8787

88-
bkupDir=backup-pre-${VERSION}
88+
bkupDir=/tmp/backup-pre-${VERSION}
8989
# fixup any previous interrupted upgrades
9090
rm -rf "${bkupDir}"
9191
for d in behavior_packs definitions minecraftpe resource_packs structures treatments world_templates
@@ -96,6 +96,11 @@ if [ ! -f "bedrock_server-${VERSION}" ]; then
9696
mv $d $bkupDir
9797
fi
9898
done
99+
# remove any old previous backups
100+
shopt -s nullglob
101+
for d in backup-pre-*; do
102+
rm -rf $d
103+
done
99104

100105
# Do not overwrite existing files, which means the cleanup above needs to account for things
101106
# that MUST be replaced on upgrade

0 commit comments

Comments
 (0)