Update glacier-install.sh

This commit is contained in:
everest 2022-04-26 13:57:10 +00:00 committed by GitHub
parent 489f11e718
commit 41191edda5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,7 +17,7 @@ export question="\x3F"
# Require the script to be run as root # Require the script to be run as root
if [[ $(/usr/bin/id -u) -ne 0 ]]; then if [[ $(/usr/bin/id -u) -ne 0 ]]; then
printf "\033[1;31m [ $error ] \033[m Please run Glacier as root." printf "\033[1;31m [ \xE2\x9C\x95 ] \033[m Please run Glacier as root."
exit exit
fi fi
@ -25,14 +25,14 @@ 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... "
printf "Checking world... " && wget https://github.com/everest-linux/glacier-pkgs/raw/main/world/$input.tar.gz printf "Checking world... " && wget https://github.com/everest-linux/glacier-pkgs/raw/main/world/$input.tar.gz
if [ "$?" != "0" ]; then if [ "$?" != "0" ]; then
printf "\033[1;31m [ $error ] \033[m Package not found. " 1>&2 printf "\033[1;31m [ \xE2\x9C\x95 ] \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... "
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
printf "\033[1;31m [ $error ] \033[m Could not unpack $input.tar.gz. " 1>&2 printf "\033[1;31m [ \xE2\x9C\x95 ] \033[m Could not unpack $input.tar.gz. " 1>&2
exit 1 exit 1
fi fi
chmod +x INSTALL.sh chmod +x INSTALL.sh
@ -44,4 +44,4 @@ printf "\033[1;34m [ i ] \033[m Cleaning up... " # Status message
mv $input-pkginfo.json /etc/glacier/pkginfo mv $input-pkginfo.json /etc/glacier/pkginfo
cd .. cd ..
rm -rf $input rm -rf $input
printf "\033[1;32m [ $check ] \033[m Operation completed." printf "\033[1;32m [ \xE2\x9C\x93 ] \033[m Operation completed."