Minor bug fixes
This commit is contained in:
parent
5531e98595
commit
f09d6d45ea
16
src/glacier
16
src/glacier
@ -164,6 +164,10 @@ cleanup () {
|
|||||||
cd .. && rm -rf *.checksum *.tar.* $2
|
cd .. && rm -rf *.checksum *.tar.* $2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pre_hooks() {
|
||||||
|
source /etc/glacier/hooks
|
||||||
|
}
|
||||||
|
|
||||||
post_hooks () {
|
post_hooks () {
|
||||||
printf "$blue[ i ]$reset Executing post-operation hooks...\n"
|
printf "$blue[ i ]$reset Executing post-operation hooks...\n"
|
||||||
/etc/glacier/post-hooks
|
/etc/glacier/post-hooks
|
||||||
@ -216,8 +220,9 @@ case $1 in
|
|||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
cd /opt/glacier/workspace
|
cd /opt/glacier/workspace
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
pre_hooks "$@"
|
||||||
get_pkg "$@"
|
get_pkg "$@"
|
||||||
int_check # Will implement this later on
|
int_check "$@"
|
||||||
unpack_pkg "$@"
|
unpack_pkg "$@"
|
||||||
installpkg "$@"
|
installpkg "$@"
|
||||||
post_hooks "$@"
|
post_hooks "$@"
|
||||||
@ -242,8 +247,9 @@ case $1 in
|
|||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
cd /opt/glacier/workspace
|
cd /opt/glacier/workspace
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
pre_hooks "$@"
|
||||||
get_pkg "$@"
|
get_pkg "$@"
|
||||||
int_check
|
int_check "$@"
|
||||||
unpack_pkg "$@"
|
unpack_pkg "$@"
|
||||||
updatepkg "$@"
|
updatepkg "$@"
|
||||||
post_hooks "$@"
|
post_hooks "$@"
|
||||||
@ -268,8 +274,9 @@ case $1 in
|
|||||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||||
cd /opt/glacier/workspace
|
cd /opt/glacier/workspace
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
pre_hooks "$@"
|
||||||
get_pkg "$@"
|
get_pkg "$@"
|
||||||
int_check
|
int_check "$@"
|
||||||
unpack_pkg "$@"
|
unpack_pkg "$@"
|
||||||
removepkg "$@"
|
removepkg "$@"
|
||||||
post_hooks "$@"
|
post_hooks "$@"
|
||||||
@ -304,7 +311,7 @@ case $1 in
|
|||||||
cd /var/cache/glacier
|
cd /var/cache/glacier
|
||||||
printf "\n"
|
printf "\n"
|
||||||
get_pkg "$@"
|
get_pkg "$@"
|
||||||
int_check
|
int_check "$@"
|
||||||
printf "$green[ $check ]$reset Operation completed.\n"
|
printf "$green[ $check ]$reset Operation completed.\n"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@ -327,6 +334,7 @@ case $1 in
|
|||||||
mv $2.tar.gz /opt/glacier/workspace
|
mv $2.tar.gz /opt/glacier/workspace
|
||||||
cd /opt/glacier/workspace
|
cd /opt/glacier/workspace
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
pre_hooks "$@"
|
||||||
unpack_pkg "$@"
|
unpack_pkg "$@"
|
||||||
installpkg "$@"
|
installpkg "$@"
|
||||||
post_hooks "$@"
|
post_hooks "$@"
|
||||||
|
Loading…
Reference in New Issue
Block a user