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))
|
||||
|
||||
printf "==> %s " "$CONFIG"
|
||||
case "$pre_or_post" in
|
||||
pre) printf "$($snapper_cmd "$(truncate_description $PACMAN_PRE_DESCRIPTION)" | tee "$prefile")\n" ;;
|
||||
post)
|
||||
if [[ -f $prefile ]]; then
|
||||
printf "$($snapper_cmd "$(truncate_description $PACMAN_POST_DESCRIPTION)" --pre-number "$(< "$prefile")")\n"
|
||||
if [[ "$pre_or_post" == "pre" ]]; then
|
||||
printf "==> %s $($snapper_cmd "$(truncate_description $PACMAN_PRE_DESCRIPTION)" | tee "$prefile")\n" "$CONFIG"
|
||||
elif [[ -f $prefile && "$pre_or_post" == "post" ]]; then
|
||||
printf "==> %s $($snapper_cmd "$(truncate_description $PACMAN_POST_DESCRIPTION)" --pre-number "$(< "$prefile")")\n" "$CONFIG"
|
||||
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"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
done
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue