Glacier v2.2 - Customizable download backend
This commit is contained in:
parent
1e2e514b49
commit
a09bbcaa6b
@ -25,7 +25,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
--version)
|
--version)
|
||||||
printf "$blue Glacier v2.1 $reset\n"
|
printf "$blue Glacier v2.2 $reset\n"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
install|-f)
|
install|-f)
|
||||||
@ -38,7 +38,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
# 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... " && wget $GREPO1/$input.tar.gz -q --show-progress || wget $GREPO2/$input.tar.gz -q --show-progress || wget $GREPO3/$input.tar.gz -q --show-progress || wget $GREPO4/$input.tar.gz -q --show-progress || wget $GREPO5/$input.tar.gz -q --show-progress || wget $GREPO6/$input.tar.gz -q --show-progress || wget $GREPO7/$input.tar.gz -q --show-progress || wget $GREPO8/$input.tar.gz -q --show-progress
|
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
|
||||||
@ -82,7 +82,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
|
|
||||||
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... " && wget $GREPO1/$input.tar.gz -q --show-progress || wget $GREPO2/$input.tar.gz -q --show-progress || wget $GREPO3/$input.tar.gz -q --show-progress || wget $GREPO4/$input.tar.gz -q --show-progress || wget $GREPO5/$input.tar.gz -q --show-progress || wget $GREPO6/$input.tar.gz -q --show-progress || wget $GREPO7/$input.tar.gz -q --show-progress || wget $GREPO8/$input.tar.gz -q --show-progress
|
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 [ $error ] \033[m Package not found.\n" 1>&2
|
printf "\033[1;31m [ $error ] \033[m Package not found.\n" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
@ -124,7 +124,7 @@ while [[ $# -gt 0 ]]; do
|
|||||||
|
|
||||||
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 Removing $input.tar.gz...\n"
|
printf "\033[1;34m [ i ] \033[m Removing $input.tar.gz...\n"
|
||||||
printf "\033[1;34m [ i ] \033[m Checking databases... " && wget $GREPO1/$input.tar.gz -q --show-progress || wget $GREPO2/$input.tar.gz -q --show-progress || wget $GREPO3/$input.tar.gz -q --show-progress || wget $GREPO4/$input.tar.gz -q --show-progress || wget $GREPO5/$input.tar.gz -q --show-progress || wget $GREPO6/$input.tar.gz -q --show-progress || wget $GREPO7/$input.tar.gz -q --show-progress || wget $GREPO8/$input.tar.gz -q --show-progress
|
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 [ $error ] \033[m Package not found.\n" 1>&2
|
printf "\033[1;31m [ $error ] \033[m Package not found.\n" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
@ -174,11 +174,11 @@ while [[ $# -gt 0 ]]; do
|
|||||||
|
|
||||||
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 Caching $input.tar.gz...\n"
|
printf "\033[1;34m [ i ] \033[m Caching $input.tar.gz...\n"
|
||||||
printf "\033[1;34m [ i ] \033[m Checking databases... " && wget $GREPO1/$input.tar.gz -q --show-progress || wget $GREPO2/$input.tar.gz -q --show-progress || wget $GREPO3/$input.tar.gz -q --show-progress || wget $GREPO4/$input.tar.gz -q --show-progress || wget $GREPO5/$input.tar.gz -q --show-progress || wget $GREPO6/$input.tar.gz -q --show-progress || wget $GREPO7/$input.tar.gz -q --show-progress || wget $GREPO8/$input.tar.gz -q --show-progress
|
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 [ $error ] \033[m Package not found.\n" 1>&2
|
printf "\033[1;31m [ $error ] \033[m Package not found.\n" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
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
|
||||||
mv $input.tar.gz /var/cache/glacier
|
mv $input.tar.gz /var/cache/glacier
|
||||||
|
@ -1,28 +1,35 @@
|
|||||||
#
|
#
|
||||||
# /etc/glacier.conf
|
# /etc/glacier.conf
|
||||||
# This file will be loaded by Glacier when called
|
# The settings stored in this file will be loaded when Glacier is called
|
||||||
|
# For more information on each of these options, see https://git.everest
|
||||||
#
|
#
|
||||||
|
|
||||||
# Repositories Glacier will use
|
# Repositories Glacier will use
|
||||||
GREPO1=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/world # System Software
|
GREPO1=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/world # System Software
|
||||||
GREPO2=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/galaxy # GPL Only Software
|
GREPO2=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/galaxy # GPL Only Software
|
||||||
GREPO3=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/universe # All Open Source Software
|
GREPO3=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/universe # All Open Source Software
|
||||||
#GREPO4=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/multiverse # Proprietary Software
|
#GREPO4=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/multiverse # Proprietary Software
|
||||||
#GREPO5=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/world-testing
|
#GREPO5=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/world-testing
|
||||||
#GREPO6=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/galaxy-testing
|
#GREPO6=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/galaxy-testing
|
||||||
#GREPO7=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/universe-testing
|
#GREPO7=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/universe-testing
|
||||||
#GREPO8=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/multiverse-testing
|
#GREPO8=https://git.everestlinux.org/EverestLinux/glacier-pkgs/raw/branch/main/multiverse-testing
|
||||||
|
|
||||||
# Define colors and unicode symbols to be used
|
# Define colors and unicode symbols to be used
|
||||||
export red="\033[1;31m"
|
export red="\033[1;31m"
|
||||||
export green="\033[1;32m"
|
export green="\033[1;32m"
|
||||||
export yellow="\033[1;33m"
|
export yellow="\033[1;33m"
|
||||||
export blue="\033[1;34m"
|
export blue="\033[1;34m"
|
||||||
export reset="\033[m"
|
export reset="\033[m"
|
||||||
export check="\xE2\x9C\x93"
|
export check="\xE2\x9C\x93"
|
||||||
export error="\xE2\x9C\x95"
|
export error="\xE2\x9C\x95"
|
||||||
export warning="\x21"
|
export warning="\x21"
|
||||||
export question="\x3F"
|
export question="\x3F"
|
||||||
|
|
||||||
|
# Which backend Glacier will use to download files
|
||||||
|
# Selecting more than one backend will cause breakage
|
||||||
|
GLACIER_DOWNLOAD_BACKEND="wget --quiet --show-progress"
|
||||||
|
#GLACIER_DOWNLOAD_BACKEND="curl --output $input.tar.gz"
|
||||||
|
#GLACIER_DOWNLOAD_BACKEND="aria2c"
|
||||||
|
|
||||||
#
|
#
|
||||||
# end /etc/glacier.conf
|
# end /etc/glacier.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user