Skip to content

Commit

Permalink
assume first part of $BACKUP is the executable
Browse files Browse the repository at this point in the history
Pointed out in #8
  • Loading branch information
pigmonkey committed Feb 15, 2024
1 parent 2bff849 commit c410f4b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cryptshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,11 @@ if [ ! -d "$MOUNTPOINT" ]; then
fi
fi

# Exit if backup program is not executable.
if [ ! -x "$BACKUP" ]; then
echo 'Backup program not existing or not executable.'
# Exit if backup program is not executable. Assume the executable is everything
# up to the first space.
BACKUP_EX=${BACKUP%%[[:space:]]*}
if [ ! -x "$BACKUP_EX" ]; then
echo "Backup program does not exist or is not executable: $BACKUP_EX"
exit $EX_CONFIG
fi

Expand Down

0 comments on commit c410f4b

Please sign in to comment.