Update glacier

This commit is contained in:
everest 2022-06-10 14:06:21 +00:00 committed by GitHub
parent a80d75b5ef
commit 343a7c1285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -170,7 +170,7 @@ while [[ $# -gt 0 ]]; do
printf "$blue [ i ]$reset Verifying integrity of package...\n" printf "$blue [ i ]$reset Verifying integrity of package...\n"
sha256sum $input.tar.gz sha256sum $input.tar.gz
mv $input.tar.gz /var/cache/glacier mv $input.tar.gz /var/cache/glacier
printf "\033[1;32m [ $check ] \033[m Operation completed." printf "\033[1;32m [ $check ] \033[m Operation completed.\n"
exit 0 exit 0
;; ;;
cache-install|-ci) cache-install|-ci)
@ -181,13 +181,13 @@ while [[ $# -gt 0 ]]; do
fi fi
printf "\033[1;34m [ ? ] \033[m Enter package name: " && read input printf "\033[1;34m [ ? ] \033[m Enter package name: " && read input
printf "\033[1;34m [ i ] \033[m Checking cache for $input.tar.gz... " printf "\033[1;34m [ i ] \033[m Checking cache for $input.tar.gz...\n"
cd /var/cache/glacier && cp $input.tar.gz /tmp && cd /tmp cd /var/cache/glacier && cp $input.tar.gz /tmp && cd /tmp
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
printf "\033[1;31m [ $error ] \033[m Could not fetch package from cache.\n" 1>&2 printf "\033[1;31m [ $error ] \033[m Could not fetch package from cache.\n" 1>&2
exit 1 exit 1
fi fi
printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz... " printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz...\n"
mkdir $input && mv $input.tar.gz $input && cd $input mkdir $input && mv $input.tar.gz $input && cd $input
tar -xf $input.tar.gz tar -xf $input.tar.gz
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then