Remove test if there are no snapper configs

this is tested at the end of the script already
This commit is contained in:
James Barnett 2017-02-14 13:09:43 -06:00
parent b5220f2a5d
commit b14f923a09
No known key found for this signature in database
GPG key ID: E4B5E45AA3B8C5C3

View file

@ -55,7 +55,6 @@ source "$SNAPPER_CONFIG_FILE"
[[ ! -d /var/run/dbus ]] && die "No dbus available. Are you in a chroot environment?" [[ ! -d /var/run/dbus ]] && die "No dbus available. Are you in a chroot environment?"
[[ $# -ne 1 ]] && die "Only one argument should be passed to this script." [[ $# -ne 1 ]] && die "Only one argument should be passed to this script."
[[ $1 != "pre" ]] && [[ $1 != "post" ]] && die "First argument should either be 'pre' or 'post'." [[ $1 != "pre" ]] && [[ $1 != "post" ]] && die "First argument should either be 'pre' or 'post'."
[[ -z "$SNAPPER_CONFIGS" ]] && die "No snapper configurations found, so not taking any snapshots."
declare -r pre_or_post=$1 declare -r pre_or_post=$1
declare pacman_cmd="$(sed 's./usr/bin/pacman.pacman.g' <(ps -C pacman -o args=))" declare pacman_cmd="$(sed 's./usr/bin/pacman.pacman.g' <(ps -C pacman -o args=))"