From d43cf7a839ce51037352164698b498b6a5e63112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Bid=C5=BEan?= Date: Sun, 23 Mar 2025 10:03:54 +0100 Subject: [PATCH] Fixing some things --- sd-script.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sd-script.sh b/sd-script.sh index 9e026ea..44fca97 100755 --- a/sd-script.sh +++ b/sd-script.sh @@ -22,7 +22,7 @@ YELLOW="\e[33m" ENDCOLOR="\e[0m" #Copying locally -mkdir $mntpoint &> /dev/null +$doso mkdir $mntpoint #&> /dev/null if $doso mount -U $sd_uuid $mntpoint; then echo -e "[✅]$GREEN Mounted SD successfully$ENDCOLOR" else echo -e "[❌] $RED Failed to mount SD$ENDCOLOR" && exit 1; @@ -42,6 +42,7 @@ $doso chown -R $USER:$USER $srcdir/ rm -fv $srcdir/* #Copying to other PCS +while true; do printf "[✅]All good. We can now send the files to other PCs. These are some presets: 1) @@ -54,7 +55,7 @@ printf "[✅]All good. We can now send the files to other PCs. These are some pr Host: Waffelo's PC IP: 192.168.0.203 User: waffelo - dir: /mnt/hdd/Pictures/nikon + dir: /media/hdd/Pictures/nikon 3) Host: Jacob's Pinephone @@ -73,21 +74,20 @@ printf "[✅]All good. We can now send the files to other PCs. These are some pr 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 + 1) if rsync -rvu --ignore-existing $destdir/ alarm@192.168.0.148:$HOME/.local/usr/Pictures/nikon/pics-$(date '+%d-%b-%Y')/ ; then echo -e "[✅]$GREEN Copying successful.$ENDCOLOR" else echo -e "[❌] $RED Copying failed. Check IP in settings.$ENDCOLOR"; fi;; - 2) if rsync -rvu --ignore-existing $destdir/ waffelo@192.168.0.203:/mnt/hdd/Pictures/nikon ; then + 2) if rsync -rvu --ignore-existing $destdir/ waffelo@192.168.0.203:/media/hdd/Pictures/nikon/pics-$(date '+%d-%b-%Y')/ ; then echo -e "[✅]$GREEN Copying successful.$ENDCOLOR" else echo -e "[❌] $RED Copying failed. Check IP in settings.$ENDCOLOR"; fi;; - 3) if rsync -rvu --ignore-existing $destdir/ alarm@192.168.0.157:$HOME/.local/usr/Pictures/nikon ; then + 3) if rsync -rvu --ignore-existing $destdir/ alarm@192.168.0.157:/home/alarm/.local/usr/Pictures/nikon/pics-$(date '+%d-%b-%Y')/ ; then echo -e "[✅]$GREEN Copying successful.$ENDCOLOR" else echo -e "[❌] $RED Copying failed. Check IP in settings.$ENDCOLOR"; fi;; - 4) if rsync -rvu --ignore-existing $destdir/ jacob@192.168.0.184:/mnt/hdd/nikon ; then + 4) if rsync -rvu --ignore-existing $destdir/ jacob@192.168.0.184:/mnt/hdd/nikon/pics-$(date '+%d-%b-%Y')/ ; then echo -e "[✅]$GREEN Copying successful.$ENDCOLOR" else echo -e "[❌] $RED Copying failed. Check IP in settings.$ENDCOLOR"; fi;;