Glacier v3.0.1 - Post-operation hooks added

This commit is contained in:
lw-everestlinux
2022-10-26 12:14:23 -04:00
parent 65c2ad8146
commit f6fce7323d
3 changed files with 17 additions and 2 deletions

View File

@@ -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