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) vm)
mount_vdisk mount_vdisk
echo "Copying src to vdisk..." case $2 in
cd ../src/ --ignore-dots | --dots)
sudo find . \( ! -path './.*' -and ! -name '.*' \) -and ! -path '*/.*/*' -type f -exec cp --parents {} $TMPMOUNT/ \; 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 umount_vdisk
echo "Finished." echo "Finished."
;; ;;