diff --git a/snap-pac b/snap-pac index 141e37f..f6d6790 100755 --- a/snap-pac +++ b/snap-pac @@ -18,7 +18,7 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# Main script +# Main script. Is sourced by other scripts and functions are called if [ -f /etc/snap-pac.conf ]; then source /etc/snap-pac.conf @@ -50,3 +50,9 @@ function post done } + +function clean +{ + rm /usr/share/libalpm/hooks.bin/snap-pac/.pre* + echo "NOTE: No post snapshot will be performed for this transaction, since you are removing the pacman hooks." +} diff --git a/snap-pac-clean b/snap-pac-clean index 0d2fab0..f770549 100755 --- a/snap-pac-clean +++ b/snap-pac-clean @@ -18,5 +18,4 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -rm /usr/share/libalpm/hooks.bin/snap-pac/.pre* -echo "NOTE: No post snapshot will be performed for this transaction, since you are removing the pacman hooks." +source /usr/share/libalpm/hooks.bin/snap-pac/snap-pac; clean