more refactoring
This commit is contained in:
parent
1969e5bd15
commit
ea299e2b8a
1 changed files with 10 additions and 14 deletions
|
|
@ -87,18 +87,14 @@ for CONFIG in $SNAPPER_CONFIGS; do
|
||||||
|
|
||||||
x=$((x+1))
|
x=$((x+1))
|
||||||
|
|
||||||
printf "==> %s " "$CONFIG"
|
if [[ "$pre_or_post" == "pre" ]]; then
|
||||||
case "$pre_or_post" in
|
printf "==> %s $($snapper_cmd "$(truncate_description $PACMAN_PRE_DESCRIPTION)" | tee "$prefile")\n" "$CONFIG"
|
||||||
pre) printf "$($snapper_cmd "$(truncate_description $PACMAN_PRE_DESCRIPTION)" | tee "$prefile")\n" ;;
|
elif [[ -f $prefile && "$pre_or_post" == "post" ]]; then
|
||||||
post)
|
printf "==> %s $($snapper_cmd "$(truncate_description $PACMAN_POST_DESCRIPTION)" --pre-number "$(< "$prefile")")\n" "$CONFIG"
|
||||||
if [[ -f $prefile ]]; then
|
|
||||||
printf "$($snapper_cmd "$(truncate_description $PACMAN_POST_DESCRIPTION)" --pre-number "$(< "$prefile")")\n"
|
|
||||||
rm -f "$prefile"
|
rm -f "$prefile"
|
||||||
else
|
elif [[ ! -f $prefile && "$pre_or_post" == "post" ]]; then
|
||||||
warning "%s does not exist, so no post snapshot for %s will be taken. If you are initially installing $name, this is normal." "$prefile" "$CONFIG"
|
warning "%s does not exist, so no post snapshot for %s will be taken. If you are initially installing $name, this is normal." "$prefile" "$CONFIG"
|
||||||
fi
|
fi
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue