From 8d240ebdaa02979d1f2b3f6112f0228667c39a40 Mon Sep 17 00:00:00 2001 From: Will Budic Date: Thu, 26 Feb 2026 18:42:44 +1100 Subject: [PATCH] fix: syntax was wrong for test $IS_LOCAL set --- linux-B_L_R_via_sshfs/backup.sh | 2 +- linux-B_L_R_via_sshfs/list.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/linux-B_L_R_via_sshfs/backup.sh b/linux-B_L_R_via_sshfs/backup.sh index edc9431..a7c7392 100755 --- a/linux-B_L_R_via_sshfs/backup.sh +++ b/linux-B_L_R_via_sshfs/backup.sh @@ -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 diff --git a/linux-B_L_R_via_sshfs/list.sh b/linux-B_L_R_via_sshfs/list.sh index 15cc52f..7c70774 100755 --- a/linux-B_L_R_via_sshfs/list.sh +++ b/linux-B_L_R_via_sshfs/list.sh @@ -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 -- 2.34.1