remove verbose option
This commit is contained in:
parent
7ad490c283
commit
1cffe0260a
3 changed files with 2 additions and 17 deletions
|
|
@ -13,6 +13,3 @@
|
||||||
|
|
||||||
# Snapper cleanup algorithm to use.
|
# Snapper cleanup algorithm to use.
|
||||||
#CLEANUP_ALGORITHM="number"
|
#CLEANUP_ALGORITHM="number"
|
||||||
|
|
||||||
# Set to "true" to make commands verbose
|
|
||||||
#VERBOSE="false"
|
|
||||||
|
|
|
||||||
10
snapper-post
10
snapper-post
|
|
@ -29,20 +29,12 @@ fi
|
||||||
cleanupalgo=${CLEANUP_ALGORITHM:-"number"}
|
cleanupalgo=${CLEANUP_ALGORITHM:-"number"}
|
||||||
description=${POST_DESCRIPTION:-"$(echo $(ps -C pacman -o args=) | sed 'sX/usr/bin/pacmanXpacmanXg')"}
|
description=${POST_DESCRIPTION:-"$(echo $(ps -C pacman -o args=) | sed 'sX/usr/bin/pacmanXpacmanXg')"}
|
||||||
configurations=${CONFIGS:-"root"}
|
configurations=${CONFIGS:-"root"}
|
||||||
be_verbose=${VERBOSE:-"false"}
|
|
||||||
PREFILE_PREFIX="/usr/share/libalpm/hooks.bin/snap-pac/.pre"
|
PREFILE_PREFIX="/usr/share/libalpm/hooks.bin/snap-pac/.pre"
|
||||||
for x in $configurations; do
|
for x in $configurations; do
|
||||||
if [ -f $PREFILE_PREFIX"_"$x ]; then
|
if [ -f $PREFILE_PREFIX"_"$x ]; then
|
||||||
SNAPPERPACPRE=$(cat $PREFILE_PREFIX"_"$x)
|
SNAPPERPACPRE=$(cat $PREFILE_PREFIX"_"$x)
|
||||||
snapper --config $x create --cleanup-algorithm $cleanupalgo --type post --pre-number $SNAPPERPACPRE --description "$description"
|
snapper --config $x create --cleanup-algorithm $cleanupalgo --type post --pre-number $SNAPPERPACPRE --description "$description"
|
||||||
case "${be_verbose}" in
|
rm $PREFILE_PREFIX"_"$x
|
||||||
true)
|
|
||||||
snapper -v --config $x create --cleanup-algorithm $cleanupalgo --type post --pre-number $SNAPPERPACPRE --description "$description"
|
|
||||||
rm -v $PREFILE_PREFIX"_"$x;;
|
|
||||||
*)
|
|
||||||
snapper --config $x create --cleanup-algorithm $cleanupalgo --type post --pre-number $SNAPPERPACPRE --description "$description"
|
|
||||||
rm $PREFILE_PREFIX"_"$x
|
|
||||||
esac
|
|
||||||
else
|
else
|
||||||
echo "WARNING: $PREFILE_PREFIX"_"$x does not exist, so no post snapshot will be taken. If you are initially installing snap-pac, this is normal."
|
echo "WARNING: $PREFILE_PREFIX"_"$x does not exist, so no post snapshot will be taken. If you are initially installing snap-pac, this is normal."
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -29,11 +29,7 @@ fi
|
||||||
cleanupalgo=${CLEANUP_ALGORITHM:-"number"}
|
cleanupalgo=${CLEANUP_ALGORITHM:-"number"}
|
||||||
description=${POST_DESCRIPTION:-"$(echo $(ps -C pacman -o args=) | sed 'sX/usr/bin/pacmanXpacmanXg')"}
|
description=${POST_DESCRIPTION:-"$(echo $(ps -C pacman -o args=) | sed 'sX/usr/bin/pacmanXpacmanXg')"}
|
||||||
configurations=${CONFIGS:-"root"}
|
configurations=${CONFIGS:-"root"}
|
||||||
be_verbose=${VERBOSE:-"false"}
|
|
||||||
PREFILE_PREFIX="/usr/share/libalpm/hooks.bin/snap-pac/.pre"
|
PREFILE_PREFIX="/usr/share/libalpm/hooks.bin/snap-pac/.pre"
|
||||||
for x in $configurations; do
|
for x in $configurations; do
|
||||||
case "${be_verbose}" in
|
snapper --config $x create --type pre --cleanup-algorithm $cleanupalgo --print-number --description "$description" > $PREFILE_PREFIX"_"$x
|
||||||
true) snapper -v --config $x create --type pre --cleanup-algorithm $cleanupalgo --print-number --description "$description" > $PREFILE_PREFIX"_"$x;;
|
|
||||||
*) snapper --config $x create --type pre --cleanup-algorithm $cleanupalgo --print-number --description "$description" > $PREFILE_PREFIX"_"$x
|
|
||||||
esac
|
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue