]> lifelog.hopto.org Git - wb-shell-scripts.git/commitdiff
fix: syntax was wrong for test $IS_LOCAL set
authorWill Budic <redacted>
Thu, 26 Feb 2026 07:42:44 +0000 (18:42 +1100)
committerWill Budic <redacted>
Thu, 26 Feb 2026 07:42:44 +0000 (18:42 +1100)
linux-B_L_R_via_sshfs/backup.sh
linux-B_L_R_via_sshfs/list.sh

index edc94317e9927f2ff44e7ad491324ee805e5a119..a7c739247dd5aab80c470cb1250091273995deb4 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/env bash
 CLR1=$'\x1b[38;5;87m'   # cyan
 CLR2=$'\x1b[38;5;211m'  # magenta
 CLR3=$'\x1b[38;5;120m'  # green
index 15cc52fc4dbff2b94a5f71e6faf5db6b43039a58..7c70774c2167a181cce7e1fd65631264e68813ca 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/env bash
 # Includes
 SRC_DIR=`dirname "$0"`
 if [[ -f ~/.config/backup.config ]]; then
@@ -7,18 +7,18 @@ else
 CONFIG_FILE="$SRC_DIR/backup.config"
 fi 
 
-echo -e "Processing from config: $CONFIG_FILE"
+echo -e "Processing listing set by config: $CONFIG_FILE"
 source $CONFIG_FILE
 
 #
-echo -e "\n--------------------------------------------------------------------------------------------------------------"
+echo -e "--------------------------------------------------------------------------------------------------------------"
 echo -e " This is an backup archive restore list creator, use this program from the directory you restore to locally."
 echo -e " Backup location is DEST_SERVER='$DEST_SERVER'"
 echo -e " Restore location is PWD='`pwd`'"
 echo -e "--------------------------------------------------------------------------------------------------------------"
 echo -e "Syntax: $0 {{--target=/some/path} {--tar | restore.lst}"
 echo "After listing, to restore from the backup, use the list with the restore shell script."
-echo "Like: $SRC_DIR/restore.sh ./restore.lst"
+echo -e "Like: $SRC_DIR/restore.sh ./restore.lst"
 echo "To restore from a local drive or mount:"
 echo "$SRC_DIR/restore.sh --target=/mnt/$user/samsung  ./restore.lst"
 echo -e "\nOptions/Instructions:\n  --tar  - Instruction to generate and text tar listing from latest archive. In text format to be viewed.\n" 
@@ -59,7 +59,7 @@ then
 fi
 
 
-if [[ -z $IS_LOCAL ]];
+if [[ "$IS_LOCAL" == "false" || -z "$IS_LOCAL" ]];
 then
     echo -e "Mounting  -> $USER@$DEST_SERVER:$BACKUP_DIRECTORY to $TARGET"
     sshfs "$USER@$DEST_SERVER:$BACKUP_DIRECTORY" $TARGET -o allow_other