better bash syntax
This commit is contained in:
parent
7017e68087
commit
b4fa01786d
1 changed files with 2 additions and 2 deletions
4
snap-pac
4
snap-pac
|
|
@ -38,7 +38,7 @@ if [[ $1 != "pre" ]] && [[ $1 != "post" ]]; then
|
|||
fi
|
||||
|
||||
# Get configurations directly from snapper
|
||||
if [ -f /etc/conf.d/snapper ]; then
|
||||
if [[ -f /etc/conf.d/snapper ]]; then
|
||||
source /etc/conf.d/snapper
|
||||
else
|
||||
echo "ERROR: /etc/conf.d/snapper does not exist! Aborting..."
|
||||
|
|
@ -71,7 +71,7 @@ for CONFIG in $SNAPPER_CONFIGS; do
|
|||
|
||||
elif [[ "$pre_or_post" == "post" ]]; then
|
||||
|
||||
if [ -f $prefile ]; then
|
||||
if [[ -f $prefile ]]; then
|
||||
snapper --config $CONFIG create --type $pre_or_post --cleanup-algorithm $PACMAN_CLEANUP_ALGORITHM --description "$PACMAN_POST_DESCRIPTION" --pre-number $(< $prefile)
|
||||
rm $prefile
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue