Don't rsync empty directories, but do show in debug
This commit is contained in:
parent
a7eb0e5658
commit
8b43529790
1 changed files with 3 additions and 1 deletions
|
@ -62,7 +62,9 @@ function create_subvolumes() {
|
||||||
for subvol in "${subvols[@]}"
|
for subvol in "${subvols[@]}"
|
||||||
do
|
do
|
||||||
${cmd} btrfs subvolume create /mnt/"$subvol"
|
${cmd} btrfs subvolume create /mnt/"$subvol"
|
||||||
${cmd} rsync -avhHi --delete-after "/mnt/@/${SUBVOLS_DEFAULT[$subvol]}/" "/mnt/$subvol/"
|
if [[ -d "/mnt/@/${SUBVOLS_DEFAULT[$subvol]}" || "DEBUG" ]]; then
|
||||||
|
${cmd} rsync -avhHi --delete-after "/mnt/@/${SUBVOLS_DEFAULT[$subvol]}/" "/mnt/$subvol/"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
${cmd} umount /mnt
|
${cmd} umount /mnt
|
||||||
|
|
Loading…
Reference in a new issue