From 89db1fcfe7a094c482198f0efd20f0234c833946 Mon Sep 17 00:00:00 2001 From: James Barnett Date: Tue, 14 Feb 2017 13:13:56 -0600 Subject: [PATCH] sourcing already tests if file exists --- scripts/snap-pac | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/snap-pac b/scripts/snap-pac index b53533e..a2f72d8 100755 --- a/scripts/snap-pac +++ b/scripts/snap-pac @@ -33,7 +33,7 @@ die() { [[ $PACMAN_ABORT_ON_FAIL == "no" ]] && exit 0 exit 1 } -error_exit() { die "Encountered unknown error."; } +error_exit() { die "Aborted due to error."; } kill_exit() { die "\nExited due to user intervention."; } truncate_description() { @@ -48,7 +48,6 @@ truncate_description() { trap error_exit ERR trap kill_exit SIGTERM SIGINT -[[ ! -f "$SNAPPER_CONFIG_FILE" ]] && die "%s does not exist." "$SNAPPER_CONFIG_FILE" source "$SNAPPER_CONFIG_FILE" [[ $EUID -ne 0 ]] && die "Script must be run as root."