10/4/22 - iron out tons of bugs

This commit is contained in:
lw-everestlinux
2022-10-04 14:11:27 -04:00
parent dcb6e36f59
commit 5adf51bb6b
8 changed files with 125 additions and 61 deletions

View File

@@ -1,18 +1,19 @@
#!/bin/sh
source /etc/glacier.conf
# Errors
export GLACIER_ERROR_NO_ROOT=$(printf "$red [ $error ]$reset Please run Glacier as root.\n")
export GLACIER_ERROR_DOES_NOT_EXIST=$(printf "$red [ $error ]$reset Package $input either does not exist, or is in a repository that is not enabled.\n")
export GLACIER_ERROR_CANNOT_UNPACK=$(printf "$red [ $error ]$reset Package archive cannot be unpacked.\n")
export GLACIER_ERROR_INSTRUCTIONS_CANNOT_EXECUTE=$(printf "$red [ $error ]$reset Instructions were either unable to execute, or encountered an error while executing.\n")
export GLACIER_ERROR_NO_ROOT="$red [ $error ]$reset Please run Glacier as root.\n"
export GLACIER_ERROR_DOES_NOT_EXIST="$red [ $error ]$reset Package $input either does not exist, or is in a repository that is not enabled.\n"
export GLACIER_ERROR_CANNOT_UNPACK="$red [ $error ]$reset Package archive cannot be unpacked.\n"
export GLACIER_ERROR_INSTRUCTIONS_CANNOT_EXECUTE="$red [ $error ]$reset Instructions were either unable to execute, or encountered an error while executing.\n"
# Status
export GLACIER_STATUS_INSTALLING=$(printf "$blue [ i ]$reset Installing $input...\n")
export GLACIER_STATUS_UPDATING=$(printf "$blue [ i ]$reset Updating $input...\n")
export GLACIER_STATUS_REMOVING=$(printf "$blue [ i ]$reset Removing $input...\n")
export GLACIER_STATUS_CACHING=$(printf "$blue [ i ]$reset Caching $input...\n")
export GLACIER_STATUS_UNPACKING=$(printf "$blue [ i ]$reset Unpacking $input.tar.gz...\n")
export GLACIER_STATUS_INTEGRITY_CHECK=$(printf "$blue [ i ]$reset Verifying integrity of package...\n")
export GLACIER_STATUS_EXECUTING=$(printf "$blue [ i ]$reset Executing instructions...\n")
)
export GLACIER_WHICH_PKG=$(printf "$blue [ $question ]$reset Enter package name: ")
export GLACIER_STATUS_INSTALLING="$blue [ i ]$reset Installing $input...\n"
export GLACIER_STATUS_UPDATING="$blue [ i ]$reset Updating $input...\n"
export GLACIER_STATUS_REMOVING="$blue [ i ]$reset Removing $input...\n"
export GLACIER_STATUS_CACHING="$blue [ i ]$reset Caching $input...\n"
export GLACIER_STATUS_UNPACKING="$blue [ i ]$reset Unpacking $input.tar.gz...\n"
export GLACIER_STATUS_INTEGRITY_CHECK="$blue [ i ]$reset Verifying integrity of package...\n"
export GLACIER_STATUS_EXECUTING=printf "$blue [ i ]$reset Executing instructions...\n"
export GLACIER_WHICH_PKG="$blue [ $question ]$reset Enter package name: "