Skip to content

Commit 60173a8

Browse files
authored
Maintain directory structure on backup (#457)
1 parent 5dc596f commit 60173a8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bedrock-entry.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ if [[ ! -f "bedrock_server-${VERSION}" ]]; then
128128
mkdir -p "${bkupDir}/$d"
129129
echo "Backing up $d into $bkupDir"
130130
if [[ "$d" == "resource_packs" ]]; then
131-
mv $d/{chemistry,vanilla} "${bkupDir}/"
132-
[[ -n "$(ls $d)" ]] && cp -a $d/* "${bkupDir}/"
131+
mv $d/{chemistry,vanilla} "${bkupDir}/$d/"
132+
cp -a $d/ "${bkupDir}/$d/"
133133
else
134-
mv $d/* "${bkupDir}/"
134+
mv $d "${bkupDir}/"
135135
fi
136136
fi
137137
done

0 commit comments

Comments
 (0)