Fixing some things
This commit is contained in:
parent
3dce517115
commit
d43cf7a839
1 changed files with 7 additions and 7 deletions
14
sd-script.sh
14
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;;
|
||||
|
||||
|
|
Loading…
Reference in a new issue