diff --git a/bin/borg.sh b/bin/borg.sh index b52a62f..1347674 100755 --- a/bin/borg.sh +++ b/bin/borg.sh @@ -1,8 +1,8 @@ #!/bin/bash -[[ ! -f "$HOME/.borgbackup.env" ]] && printf "\$HOME/.borgbackup.env doesn't exist!\n" && exit 1 +[[ ! -f "$HOME"/.borgbackup.env ]] && printf "\$HOME/.borgbackup.env doesn't exist!\n" && exit 1 -if [[ "$(stat -c "$HOME/.borgbackup.env")" != "-rw-------" ]]; then +if [[ "$(stat -c %A "$HOME"/.borgbackup.env)" != "-rw-------" ]]; then printf "WARNING!!!! \$HOME/.borgbackup.env has the wrong permissions!\n" printf "\nrun : chmod 0600 \$HOME/.borgbackup.env\n" exit 1