Skip to content

Commit

Permalink
Maintain directory structure on backup (#457)
Browse files Browse the repository at this point in the history
  • Loading branch information
othorp authored Sep 15, 2024
1 parent 5dc596f commit 60173a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bedrock-entry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,10 @@ if [[ ! -f "bedrock_server-${VERSION}" ]]; then
mkdir -p "${bkupDir}/$d"
echo "Backing up $d into $bkupDir"
if [[ "$d" == "resource_packs" ]]; then
mv $d/{chemistry,vanilla} "${bkupDir}/"
[[ -n "$(ls $d)" ]] && cp -a $d/* "${bkupDir}/"
mv $d/{chemistry,vanilla} "${bkupDir}/$d/"
cp -a $d/ "${bkupDir}/$d/"
else
mv $d/* "${bkupDir}/"
mv $d "${bkupDir}/"
fi
fi
done
Expand Down

0 comments on commit 60173a8

Please sign in to comment.