sortof finishing sd-script for now

This commit is contained in:
Jakub Bidžan 2025-03-16 17:59:53 +01:00
parent 0fb364dbfd
commit 3dce517115

View file

@ -36,8 +36,9 @@ if rsync -rvu --ignore-existing --info=progress2 $srcdir/ $destdir/pics-$(date '
echo -e "[✅]$GREEN Copying successful.$ENDCOLOR"
else echo -e "[❌] $RED Operation failed.$ENDCOLOR" && exit 1; fi
echo -e "Files from SD card will be removed in 10 seconds. If you don't want to delete files, press ctrl+C now."
sleep 10
echo -e "Files from SD card will be removed in 3 seconds. If you don't want to delete files, press ctrl+C now."
sleep 3
$doso chown -R $USER:$USER $srcdir/
rm -fv $srcdir/*
#Copying to other PCS
@ -65,10 +66,14 @@ printf "[✅]All good. We can now send the files to other PCs. These are some pr
Host: Jacob's PC
IP: 192.168.0.184
User: jacob
dir: /mnt/hdd/nikon"
dir: /mnt/hdd/nikon
5)
Quit script."
read -p "Choose a number (or 'all'): " num
while true; do
case $num in
1) if rsync -rvu --ignore-existing $destdir/ alarm@192.168.0.148:$HOME/.local/usr/Pictures/nikon ; then
echo -e "[✅]$GREEN Copying successful.$ENDCOLOR"
@ -86,6 +91,9 @@ case $num in
echo -e "[✅]$GREEN Copying successful.$ENDCOLOR"
else echo -e "[❌] $RED Copying failed. Check IP in settings.$ENDCOLOR"; fi;;
5) exit 0;;
*) echo "Invalid response."
esac
exit
done
exit 0