v2.3.0 - package integrity checking

This commit is contained in:
lw-everestlinux
2022-09-06 13:54:31 -04:00
parent b5c28dd802
commit 5688b4753d
3 changed files with 24 additions and 12 deletions

View File

@@ -66,6 +66,9 @@ while [[ $# -gt 0 ]]; do
mkdir $input && mv $input.tar.gz $input && cd $input
printf "$blue [ i ]$reset Verifying integrity of package...\n"
GLACIER_INTEGRITY_CHECK
if [ "$?" != "0" ]; then
exit 0
fi
tar -xf $input.tar.gz
if [ "$?" != "0" ]; then
printf "\033[1;31m [ \xE2\x9C\x95 ] \033[m Could not unpack $input.tar.gz.\n" 1>&2
@@ -111,6 +114,9 @@ while [[ $# -gt 0 ]]; do
mkdir $input && mv $input.tar.gz $input && cd $input
printf "$blue [ i ]$reset Verifying integrity of package...\n"
GLACIER_INTEGRITY_CHECK
if [ "$?" != "0" ]; then
exit 0
fi
tar -xf $input.tar.gz
if [ "$?" != "0" ]; then
printf "\033[1;31m [ $error ] \033[m Could not unpack $input.tar.gz.\n" 1>&2
@@ -153,6 +159,9 @@ while [[ $# -gt 0 ]]; do
mkdir $input && mv $input.tar.gz $input && cd $input
printf "$blue [ i ]$reset Verifying integrity of package...\n"
GLACIER_INTEGRITY_CHECK
if [ "$?" != "0" ]; then
exit 0
fi
tar -xf $input.tar.gz
if [ "$?" != "0" ]; then
printf "\033[1;31m [ $error ] \033[m Could not unpack $input.tar.gz.\n" 1>&2
@@ -201,6 +210,9 @@ while [[ $# -gt 0 ]]; do
fi
printf "$blue [ i ]$reset Verifying integrity of package...\n"
GLACIER_INTEGRITY_CHECK
if [ "$?" != "0" ]; then
exit 0
fi
mv $input.tar.gz /var/cache/glacier
printf "\033[1;32m [ $check ] \033[m Operation completed.\n"
exit 0