From f09d6d45eaa6537a960870230a4e696a74f8a543 Mon Sep 17 00:00:00 2001 From: lw-everestlinux Date: Tue, 8 Nov 2022 09:03:07 -0500 Subject: [PATCH] Minor bug fixes --- src/glacier | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/glacier b/src/glacier index 752c52b..1883a88 100755 --- a/src/glacier +++ b/src/glacier @@ -164,6 +164,10 @@ cleanup () { cd .. && rm -rf *.checksum *.tar.* $2 } +pre_hooks() { + source /etc/glacier/hooks +} + post_hooks () { printf "$blue[ i ]$reset Executing post-operation hooks...\n" /etc/glacier/post-hooks @@ -216,8 +220,9 @@ case $1 in if [[ $REPLY =~ ^[Yy]$ ]]; then cd /opt/glacier/workspace printf "\n" + pre_hooks "$@" get_pkg "$@" - int_check # Will implement this later on + int_check "$@" unpack_pkg "$@" installpkg "$@" post_hooks "$@" @@ -242,8 +247,9 @@ case $1 in if [[ $REPLY =~ ^[Yy]$ ]]; then cd /opt/glacier/workspace printf "\n" + pre_hooks "$@" get_pkg "$@" - int_check + int_check "$@" unpack_pkg "$@" updatepkg "$@" post_hooks "$@" @@ -268,8 +274,9 @@ case $1 in if [[ $REPLY =~ ^[Yy]$ ]]; then cd /opt/glacier/workspace printf "\n" + pre_hooks "$@" get_pkg "$@" - int_check + int_check "$@" unpack_pkg "$@" removepkg "$@" post_hooks "$@" @@ -304,7 +311,7 @@ case $1 in cd /var/cache/glacier printf "\n" get_pkg "$@" - int_check + int_check "$@" printf "$green[ $check ]$reset Operation completed.\n" exit 0 fi @@ -327,6 +334,7 @@ case $1 in mv $2.tar.gz /opt/glacier/workspace cd /opt/glacier/workspace printf "\n" + pre_hooks "$@" unpack_pkg "$@" installpkg "$@" post_hooks "$@"