From 01878d12f1926045a26f5028c022749d802c2007 Mon Sep 17 00:00:00 2001 From: Liam Waldron Date: Mon, 13 Mar 2023 10:49:04 -0400 Subject: [PATCH] maybe almost done --- README.md | 18 ++++++++++++++---- src/bin/glacier-mkprofile | 7 ++++++- src/bin/gpkg | 22 ++++++++++++++++++---- 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 9747660..557e19f 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,12 @@ Glacier is designed from the ground up, and uses a simple, PKGBUILD-like format, Glacier requires the following packages: - Bash (Glacier runtime) -- GNU make +- GNU make (package compilation) - GCC (or any compatible C compiler) -- Git -- Autoconf -- Automake +- Git (required by some packages for source control) +- Autoconf (required by some packages for compilation) +- Automake (required by some packages for compilation) +- GNU wget (Package downloads) To install Glacier, clone this repository: ``` @@ -32,3 +33,12 @@ sudo ./build.sh install # OR su -c ./build.sh install ``` + +## Included programs + +- gpkg (interfaces with and manages all packages under Glacier's local index) +- syspkg (like gpkg, except operates on the system's index) +- glist (lists all installed packages, or searches by name) +- gquery (queries information from a package) +- gpc (checks a local package against Glacier's packaging standards) +- glacier-mkprofile (updates the system profile) diff --git a/src/bin/glacier-mkprofile b/src/bin/glacier-mkprofile index 0852475..cfe6c2c 100755 --- a/src/bin/glacier-mkprofile +++ b/src/bin/glacier-mkprofile @@ -92,8 +92,13 @@ glacier_conf() { make_conf() { case ${2} in - x86-*) + x86-musl-*) echo "ARCH='x86_64'" >> /etc/make.conf + echo "TARGET='x86_64-linux-musl'" >> /etc/make.conf + ;; + x86-glibc-*) + echo "ARCH=x86_64'" >> /etc/make.conf + echo "TARGET='x86_64-pc-linux-gnu'" >> /etc/make.conf ;; i386-*) printf "[x] i386 is not supported.\n" diff --git a/src/bin/gpkg b/src/bin/gpkg index b4f50b1..16523d6 100755 --- a/src/bin/gpkg +++ b/src/bin/gpkg @@ -45,7 +45,7 @@ usage() { usage_small() { printf "${red}[${error}]${reset} Unknown option.\n" - printf "${red}[${error}]${reset} 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" } am_i_root() { @@ -166,7 +166,7 @@ case $1 in get_pkg_sources "$@" install_pkg "$@" index_pkg "$@" - elif [[ $REPLY =~ ^[Yy]$ ]]; then + elif [[ $REPLY =~ ^[Nn]$ ]]; then printf "${red}[${error}]${reset} Aborting.\n" exit 1 fi @@ -180,8 +180,15 @@ case $1 in dload_pkg "$@" checkdeps "$@" checkconflicts "$@" - get_pkg_sources "$@" - update_pkg "$@" + read -p "$(printf "${blue}[?]${reset} Proceed with this operation? (y/n) ")" -n 1 -r + if [[ $REPLY =~ ^[Yy]$ ]]; then + get_pkg_sources "$@" + update_pkg "$@" + index_pkg "$@" + elif [[ $REPLY =~ ^[Nn]$ ]]; then + printf "${red}[${error}]${reset} Aborting.\n" + exit 1 + fi exit 0 ;; -x|--remove) @@ -189,6 +196,13 @@ case $1 in cd /opt/glcier/workspace am_i_root "$@" check_if_input_is_blank "$@" + read -p "$(printf "${blue}[?]${reset} Proceed with this operation? (y/n) ")" -n 1 -r + if [[ $REPLY =~ ^[Yy]$ ]]; then + remove_pkg "$@" + elif [[ $REPLY =~ ^[Nn]$ ]]; then + printf "${red}[${error}]${reset} Aborting.\n" + exit 1 + fi remove_pkg "$@" exit 0 ;;