File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -129,12 +129,16 @@ if [ ! -f "bedrock_server-${VERSION}" ]; then
129
129
bkupDir=backup-pre-${VERSION}
130
130
# fixup any previous interrupted upgrades
131
131
rm -rf " ${bkupDir} "
132
- for d in behavior_packs definitions minecraftpe resource_packs structures treatments world_templates
133
- do
134
- if [ -d $d ]; then
135
- mkdir -p $bkupDir
132
+ for d in behavior_packs definitions minecraftpe resource_packs structures treatments world_templates; do
133
+ if [[ -d $d && -n " $( ls $d ) " ]]; then
134
+ mkdir -p $bkupDir /$d
136
135
echo " Backing up $d into $bkupDir "
137
- mv $d $bkupDir
136
+ if [[ " $d " == " resource_packs" ]]; then
137
+ mv $d /{chemistry,vanilla} $bkupDir /
138
+ [[ -n " $( ls $d ) " ]] && cp -a $d /* $bkupDir /
139
+ else
140
+ mv $d /* $bkupDir /
141
+ fi
138
142
fi
139
143
done
140
144
You can’t perform that action at this time.
0 commit comments