added --ignore-dots argument

This commit is contained in:
y4my4my4m 2023-08-28 14:11:23 +09:00
parent c5fcbe24cf
commit 8b1d036e82

View file

@ -94,9 +94,17 @@ else
;;
vm)
mount_vdisk
echo "Copying src to vdisk..."
cd ../src/
sudo find . \( ! -path './.*' -and ! -name '.*' \) -and ! -path '*/.*/*' -type f -exec cp --parents {} $TMPMOUNT/ \;
case $2 in
--ignore-dots | --dots)
echo "Copying src to vdisk ignoring dotfiles and dotfolders..."
cd ../src/
sudo find . \( ! -path './.*' -and ! -name '.*' \) -and ! -path '*/.*/*' -type f -exec cp --parents {} $TMPMOUNT/ \;
;;
*)
echo "Copying entire src to vdisk..."
sudo cp -r ../src/* $TMPMOUNT
;;
esac
umount_vdisk
echo "Finished."
;;