hi
This commit is contained in:
parent
aa29a4a030
commit
61fed8d6fd
@ -26,4 +26,9 @@ elif [ ! -f "/etc/glacier/call-hooks" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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"
|
||||||
|
25
src/bin/gpkg
25
src/bin/gpkg
@ -29,16 +29,24 @@ ensure /etc/glacier/call-hooks exists, and contains the following:
|
|||||||
source /etc/glacier.conf
|
source /etc/glacier.conf
|
||||||
source /etc/make.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
|
EOF
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
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=("${@}")
|
pkgs=("${@}")
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
printf "${0} - Merge a package into the local package index\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] \n"
|
printf "usage: ${0} [-h] [-v] [-f] [-u] [-x] [-fl] [-ul] [-d] [-s]\n"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf "${0} {-h --help} Show this message\n"
|
printf "${0} {-h --help} Show this message\n"
|
||||||
printf "${0} {-v --version} Show the current version\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} {-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} {-ul --localup} Same as -u, but takes a local directory\n"
|
||||||
printf "${0} {-d --dload} ONLY download a package\n"
|
printf "${0} {-d --dload} ONLY download a package\n"
|
||||||
|
printf "${0} {-s --settings} View runtime settings\n"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
printf "Glacier is free software.\n"
|
printf "Glacier is free software.\n"
|
||||||
printf "See the GNU GPL version 3 for details.\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"
|
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() {
|
am_i_root() {
|
||||||
if [ $(/usr/bin/id -u) != "0" ]; then
|
if [ $(/usr/bin/id -u) != "0" ]; then
|
||||||
printf "${red}[${error}]${reset} Cannot open /usr/glacier/index: permission denied. Are you root?\n"
|
printf "${red}[${error}]${reset} Cannot open /usr/glacier/index: permission denied. Are you root?\n"
|
||||||
@ -295,6 +310,10 @@ case $1 in
|
|||||||
dload_pkg "$@"
|
dload_pkg "$@"
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
-s|--settings)
|
||||||
|
view_runtime_settings "$@"
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
usage_small "$@"
|
usage_small "$@"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user