Glacier v2.2.2 - minor bug fixes
This commit is contained in:
parent
4d65c0fb9e
commit
fd6e494314
@ -10,49 +10,50 @@ source /etc/glacier/hooks.sh
|
|||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-h|--help)
|
-h|--help)
|
||||||
printf "$blue [ * ] Glacier - A source based package manager written in POSIX sh [ * ] $reset\n"
|
printf "$blue [ * ] Glacier - A source based package manager written in POSIX sh [ * ] $reset\n"
|
||||||
printf "$ glacier {-h --help} show this message and exit\n"
|
printf "$ glacier {-h --help} show this message and exit\n"
|
||||||
printf "$ glacier {--version} display the current Glacier version and exit\n"
|
printf "$ glacier {--version} display the current Glacier version and exit\n"
|
||||||
printf "# glacier {install -f} install a package\n"
|
printf "# glacier {install -f} install a package\n"
|
||||||
printf "# glacier {update -u} update a package\n"
|
printf "# glacier {update -u} update a package\n"
|
||||||
printf "# glacier {remove -x} remove a package\n"
|
printf "# glacier {remove -x} remove a package\n"
|
||||||
printf "$ glacier {query -q} query a package\n"
|
printf "$ glacier {query -q} query a package\n"
|
||||||
printf "# glacier {cache -c} cache a package\n"
|
printf "# glacier {cache -c} cache a package\n"
|
||||||
printf "# glacier {cache-install -ci} install a cached package\n"
|
printf "# glacier {cache-install -ci} install a cached package\n"
|
||||||
printf "# glacier {cache-clear -cc} clear the package cache\n"
|
printf "# glacier {cache-clear -cc} clear the package cache\n"
|
||||||
printf "$ glacier {--showDebugInfo} show debugging info\n"
|
printf "$ glacier {--showDebugInfo} show debugging info\n"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf "This program is free software: see the GNU GPL v3.0 for details.\n"
|
printf "This program is free software: see the GNU GPL v3.0 for details.\n"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
--version)
|
--version)
|
||||||
printf "$blue Glacier v2.2.1 $reset\n"
|
printf "$blue Glacier v2.2.1 $reset\n"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
install|-f)
|
install|-f)
|
||||||
# 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 [ \xE2\x9C\x95 ] \033[m Please run Glacier as root.\n"
|
printf "\033[1;31m [ \xE2\x9C\x95 ] \033[m Please run Glacier as root.\n"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Get package name and download package archive
|
# Get package name and download package archive
|
||||||
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...\n"
|
printf "\033[1;34m [ i ] \033[m Installing $input.tar.gz...\n"
|
||||||
printf "\033[1;34m [ i ] \033[m Checking databases... " && $GLACIER_DOWNLOAD_BACKEND $GREPO1/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO2/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO3/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO4/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO5/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO6/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO7/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO8/$input.tar.gz
|
printf "\033[1;34m [ i ] \033[m Checking databases... " && $GLACIER_DOWNLOAD_BACKEND $GREPO1/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO2/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO3/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO4/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO5/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO6/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO7/$input.tar.gz || $GLACIER_DOWNLOAD_BACKEND $GREPO8/$input.tar.gz
|
||||||
if [ "$?" != "0" ]; then
|
if [ "$?" != "0" ]; then
|
||||||
printf "\033[1;31m [ \xE2\x9C\x95 ] \033[m Package not found.\n" 1>&2
|
printf "\033[1;31m [ \xE2\x9C\x95 ] \033[m Package not found.\n" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
# 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"
|
printf "$blue [ i ]$reset Verifying integrity of package...\n"
|
||||||
sha256sum $input.tar.gz
|
sha256sum $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
|
||||||
exit 1
|
cd .. && rm -rf $input
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
# Run installation hooks
|
# Run installation hooks
|
||||||
chmod +x INSTALL.sh
|
chmod +x INSTALL.sh
|
||||||
@ -63,6 +64,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
./INSTALL.sh
|
./INSTALL.sh
|
||||||
if [ "$?" != "0" ]; then
|
if [ "$?" != "0" ]; then
|
||||||
printf "$red [ $error ]$reset Instructions were either unable to execute, or encountered an error while executing.\n" 1>&2
|
printf "$red [ $error ]$reset Instructions were either unable to execute, or encountered an error while executing.\n" 1>&2
|
||||||
|
cd .. && rm -rf $input
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
./$input.ts.sh
|
./$input.ts.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user