unset vars in loop; fix PRE_POST defaults
This commit is contained in:
parent
d8ef209911
commit
f9b2c62ab7
1 changed files with 8 additions and 2 deletions
|
|
@ -67,12 +67,18 @@ source "$SNAPPER_CONFIG_FILE"
|
||||||
for CONFIG in $SNAPPER_CONFIGS; do
|
for CONFIG in $SNAPPER_CONFIGS; do
|
||||||
|
|
||||||
CONFIG_FILE="/etc/snap-pac/$CONFIG.conf"
|
CONFIG_FILE="/etc/snap-pac/$CONFIG.conf"
|
||||||
|
|
||||||
|
unset PRE_POST
|
||||||
|
unset PRE_DESCRIPTION
|
||||||
|
unset POST_DESCRIPTION
|
||||||
|
unset CLEANUP_ALGORITHM
|
||||||
|
|
||||||
[[ -f "$CONFIG_FILE" ]] && [[ -r "$CONFIG_FILE" ]] && source "$CONFIG_FILE"
|
[[ -f "$CONFIG_FILE" ]] && [[ -r "$CONFIG_FILE" ]] && source "$CONFIG_FILE"
|
||||||
|
|
||||||
if [[ $CONFIG == "root" ]]; then
|
if [[ $CONFIG == "root" ]]; then
|
||||||
PRE_POST=${PRE_POST="yes"}
|
PRE_POST=${PRE_POST=:-"yes"}
|
||||||
else
|
else
|
||||||
PRE_POST=${PRE_POST="no"}
|
PRE_POST=${PRE_POST:-"no"}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ $PRE_POST == "no" ]] && continue
|
[[ $PRE_POST == "no" ]] && continue
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue