Update glacier-install.sh

This commit is contained in:
everest 2022-04-20 19:10:13 +00:00 committed by GitHub
parent 6f2576170e
commit 3d5c4e0cf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,27 +21,27 @@ if [[ $(/usr/bin/id -u) -ne 0 ]]; then
exit
fi
printf "\033[1;34m [ ? ] \033[m Enter package name:" && read input
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 "\033[1;34m [ ? ] \033[m Enter package name: " && read input
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
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
fi
printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz..."
mkdir -v $input && mv -v $input.tar.gz $input && cd $input
tar -xvf $input.tar.gz
printf "\033[1;34m [ i ] \033[m Unpacking $input.tar.gz... "
mkdir $input && mv $input.tar.gz $input && cd $input
tar -xf $input.tar.gz
if [ "$?" != "0" ]; then
printf "\033[1;31m [ $error ] \033[m Could not unpack $input.tar.gz" 1>&2
printf "\033[1;31m [ $error ] \033[m Could not unpack $input.tar.gz. " 1>&2
exit 1
fi
chmod +x INSTALL.sh
chmod +x $input.ts.sh
echo "\033[1;34m [ i ] \033[m Executing installation instructions..."
echo "\033[1;34m [ i ] \033[m Executing installation instructions... "
./INSTALL.sh # Actually executes installation script
./$input.ts.sh
printf "\033[1;34m [ i ] \033[m Cleaning up..." # Status message
mv -v $input-pkginfo.json /etc/glacier/pkginfo
printf "\033[1;34m [ i ] \033[m Cleaning up... " # Status message
mv $input-pkginfo.json /etc/glacier/pkginfo
cd ..
rm -rvf $input
rm -rf $input
printf "\033[1;32m [ $check ] \033[m Operation completed."