maybe almost done
This commit is contained in:
@@ -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"
|
||||
|
||||
22
src/bin/gpkg
22
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
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user