diff --git a/install/INSTALL.sh b/install/INSTALL.sh index abf4e82..5ad719e 100755 --- a/install/INSTALL.sh +++ b/install/INSTALL.sh @@ -38,6 +38,7 @@ mkdir /etc/glacier mkdir /etc/glacier/pkginfo mv $SRC_DIR/hooks $CONFDIR/glacier +mv $SRC_DIR/post-hooks $CONFDIR/glacier mv $SRC_DIR/hooks.sh $CONFDIR/glacier mv $SRC_DIR/make.conf $CONFDIR diff --git a/src/glacier b/src/glacier index 1aff482..e7fb27b 100755 --- a/src/glacier +++ b/src/glacier @@ -108,7 +108,7 @@ clear_cache() { } debug_info() { - printf "$blue>> Glacier v3.0.0$reset\n" + printf "$blue>> Glacier v3.0.1$reset\n" printf ">> Checking for valid download backend...\n" whereis wget whereis curl @@ -163,6 +163,11 @@ cleanup () { cd .. && rm -rf $2 } +post_hooks () { + printf "$blue[ i ]$reset Executing post-operation hooks...\n" + /etc/glacier/post-hooks +} + case $1 in -h|--help) printf "Glacier - Manage installed packages on the system\n" @@ -191,7 +196,7 @@ case $1 in exit 0 ;; -v|--version) - printf "$blue Glacier v3.0.0$reset\n" + printf "$blue Glacier v3.0.1$reset\n" exit 0 ;; -f|-install) @@ -209,6 +214,7 @@ case $1 in #int_check # Will implement this later on unpack_pkg "$@" installpkg "$@" + post_hooks "$@" cleanup "$@" printf "$green[ $check ]$reset Operation completed.\n" exit 0 @@ -229,6 +235,7 @@ case $1 in #int_check unpack_pkg "$@" updatepkg "$@" + post_hooks "$@" cleanup "$@" printf "$green[ $check ]$reset Operation completed.\n" exit 0 @@ -249,6 +256,7 @@ case $1 in #int_check unpack_pkg "$@" removepkg "$@" + post_hooks "$@" cleanup "$@" printf "$green[ $check ]$reset Operation completed.\n" exit 0 @@ -289,6 +297,7 @@ case $1 in printf "\n" unpack_pkg "$@" installpkg "$@" + post_hooks "$@" cleanup "$@" printf "$green[ $check ]$reset Operation completed.\n" exit 0 diff --git a/src/post-hooks b/src/post-hooks new file mode 100644 index 0000000..8dd39af --- /dev/null +++ b/src/post-hooks @@ -0,0 +1,5 @@ +#!/bin/sh +# Glacier post-operation hooks + + printf "No hooks to be executed.\n" + exit 1