Update glacier-update.sh

This commit is contained in:
everest 2022-05-03 15:40:50 +00:00 committed by GitHub
parent bdf412eab6
commit 6048a99fb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,13 +13,13 @@ if [[ $(/usr/bin/id -u) -ne 0 ]]; then
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 Installing $input.tar.gz... " printf "\033[1;34m [ i ] \033[m Installing $input.tar.gz...\n"
printf "Checking world... " && wget https://github.com/everest-linux/glacier-pkgs/raw/main/world/$input.tar.gz printf "Checking world...\n" && wget https://github.com/everest-linux/glacier-pkgs/raw/main/world/$input.tar.gz -q --show-progress
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
printf "\033[1;31m [ $error ] \033[m Package not found. " 1>&2 printf "\033[1;31m [ $error ] \033[m Package not found. " 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
@ -31,9 +31,9 @@ chmod +x UPDATE.sh
chmod +x $input.ts.sh chmod +x $input.ts.sh
./UPDATE.sh ./UPDATE.sh
./$input.ts.sh ./$input.ts.sh
printf "\033[1;34m [ i ] \033[m Cleaning up... " printf "\033[1;34m [ i ] \033[m Cleaning up...\n"
mv $input-pkginfo.json /etc/glacier/pkginfo mv $input-pkginfo.json /etc/glacier/pkginfo
mv $input.timestamp /var/log/glacier mv $input.timestamp /var/log/glacier
cd .. cd ..
rm -rf $input rm -rf $input
printf "\033[1;32m [ $check ] \033[m Operation completed." printf "\033[1;32m [ $check ] \033[m Operation completed.\n"