From 70b3bea10d57147d0b5a2bc08a82c66e85b0916d Mon Sep 17 00:00:00 2001 From: Jonas Forsberg Date: Wed, 14 Oct 2020 10:43:37 +0200 Subject: [PATCH] added missing formating in stat -c --- bin/borg.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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