From ef249ccc1c7ad8a0aa1aca53f2fecae78916c961 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 19 May 2022 19:35:23 -0700 Subject: [PATCH] build/bin/sage-print-system-package-command: New option --spkg --- build/bin/sage-print-system-package-command | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/build/bin/sage-print-system-package-command b/build/bin/sage-print-system-package-command index a2c6e8e7cce..4ee33ab0e65 100755 --- a/build/bin/sage-print-system-package-command +++ b/build/bin/sage-print-system-package-command @@ -5,6 +5,7 @@ shift IF_VERBOSE=: SUDO= PROMPT= +SPKG=no if [ -n "$OUTPUT_RST" ]; then COMMENT="" else @@ -13,6 +14,10 @@ fi while : do case "$1" in + --spkg) + # Whether given package names are SPKG names instead of system package names + SPKG=yes + ;; --verbose=*) IF_VERBOSE= COMMENT="${1#--verbose=}" @@ -51,7 +56,6 @@ if [ -z "$system" -o -z "$command" ]; then echo >&2 "usage: $0 {auto|debian|arch|conda|...} [--verbose] [--sudo] [--prompt] {update|install|setup-build-env|remove|...} PACKAGES..." exit 1 fi -system_packages="$*" if [ "$system" = auto ]; then system=$(sage-guess-package-system 2>/dev/null) if [ "$system" = unknown ]; then @@ -59,6 +63,11 @@ if [ "$system" = auto ]; then exit 1 fi fi +if [ "$SPKG" = "yes" ]; then + system_packages=$(echo $(sage-get-system-packages $system $*)) +else + system_packages="$*" +fi options= env= shopt -s extglob