Update glacier

This commit is contained in:
everest 2022-06-08 12:54:10 +00:00 committed by GitHub
parent b6aa112bd1
commit 2b062b9a3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -46,6 +46,8 @@ while [[ $# -gt 0 ]]; do
# Unpack Tarball # Unpack Tarball
printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz...\n" 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
printf "$blue [ i ]$reset Verifying integrity of package...\n"
shasum $input.tar.gz
tar -xf $input.tar.gz tar -xf $input.tar.gz
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
printf "\033[1;31m [ \xE2\x9C\x95 ] \033[m Could not unpack $input.tar.gz.\n" 1>&2 printf "\033[1;31m [ \xE2\x9C\x95 ] \033[m Could not unpack $input.tar.gz.\n" 1>&2
@ -83,6 +85,8 @@ while [[ $# -gt 0 ]]; do
fi fi
printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz...\n" 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
printf "$blue [ i ]$reset Verifying integrity of package...\n"
shasum $input.tar.gz
tar -xf $input.tar.gz tar -xf $input.tar.gz
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
printf "\033[1;31m [ $error ] \033[m Could not unpack $input.tar.gz.\n" 1>&2 printf "\033[1;31m [ $error ] \033[m Could not unpack $input.tar.gz.\n" 1>&2
@ -119,6 +123,8 @@ while [[ $# -gt 0 ]]; do
fi fi
printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz...\n" 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
printf "$blue [ i ]$reset Verifying integrity of package...\n"
shasum $input.tar.gz
tar -xf $input.tar.gz tar -xf $input.tar.gz
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
printf "\033[1;31m [ $error ] \033[m Could not unpack $input.tar.gz.\n" 1>&2 printf "\033[1;31m [ $error ] \033[m Could not unpack $input.tar.gz.\n" 1>&2
@ -161,6 +167,8 @@ while [[ $# -gt 0 ]]; do
printf "\033[1;31m [ $error ] \033[m Package not found.\n" 1>&2 printf "\033[1;31m [ $error ] \033[m Package not found.\n" 1>&2
exit 1 exit 1
fi fi
printf "$blue [ i ]$reset Verifying integrity of package...\n"
shasum $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."
exit 0 exit 0