diff --git a/src/bin/glacierg b/src/bin/glacierg index 18aae66..75f79d0 100755 --- a/src/bin/glacierg +++ b/src/bin/glacierg @@ -26,4 +26,9 @@ elif [ ! -f "/etc/glacier/call-hooks" ]; then exit 1 fi +for i in .; do + ${i}_NAME=${i} +done +dialog --checklist "Packages" 50 100 45 "musl" "musl embedded C library" "PKG" "busybox" "embedded UNIX utilities" "PKG" +printf "\e[2J\e[H" diff --git a/src/bin/gpkg b/src/bin/gpkg index 4ff338f..fd68f13 100755 --- a/src/bin/gpkg +++ b/src/bin/gpkg @@ -29,16 +29,24 @@ ensure /etc/glacier/call-hooks exists, and contains the following: source /etc/glacier.conf source /etc/make.conf -${0} will not attempt to run without this file. +because this program relies on many settings +within this file, ${0} will not attempt to run without it. EOF exit 1 fi +# Implement after testing +#if [ ! -d "/usr/glacier/epkgs-${GLACIER_SYSTEM_PROFILE}" ]; then +# printf "${red}[${error}]${reset} Local package database does not exist.\n" +# printf "${red}[${error}]${reset} Run 'glacier-update-pkgdb to fix this.\n" +# exit 1 +#fi + pkgs=("${@}") usage() { - printf "${0} - Merge a package into the local package index\n" - printf "usage: ${0} [-h] [-v] [-f] [-u] [-x] [-fl] [-ul] [-d] \n" + printf "${blue}${0} - Merge a package into the local package index${reset}\n" + printf "usage: ${0} [-h] [-v] [-f] [-u] [-x] [-fl] [-ul] [-d] [-s]\n" printf "\n" printf "${0} {-h --help} Show this message\n" printf "${0} {-v --version} Show the current version\n" @@ -48,6 +56,7 @@ usage() { printf "${0} {-fl --localin} Same as -f, but takes a local directory\n" printf "${0} {-ul --localup} Same as -u, but takes a local directory\n" printf "${0} {-d --dload} ONLY download a package\n" + printf "${0} {-s --settings} View runtime settings\n" printf "\n" printf "Glacier is free software.\n" printf "See the GNU GPL version 3 for details.\n" @@ -58,6 +67,12 @@ usage_small() { printf "${red}[${error}] usage:${reset} ${0} [-h] [-v] [-f] [-u] [-x] [-fl] [-ul] [-d] PACKAGE_NAME\n" } +view_runtime_settings() { + printf "${blue}[*]${reset} Viewing runtime settings for ${0}:\n" + printf "Configuration file: /etc/glacier.conf\n" + printf "Make configuration file: /etc/make.conf\n" +} + am_i_root() { if [ $(/usr/bin/id -u) != "0" ]; then printf "${red}[${error}]${reset} Cannot open /usr/glacier/index: permission denied. Are you root?\n" @@ -295,6 +310,10 @@ case $1 in dload_pkg "$@" exit 0 ;; + -s|--settings) + view_runtime_settings "$@" + exit 0 + ;; *) usage_small "$@" exit 1