Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
build/bin/sage-get-system-packages: If system=auto, use sage-guess-pa…
Browse files Browse the repository at this point in the history
…ckage-system
  • Loading branch information
mkoeppe committed May 20, 2022
1 parent bf6aeb9 commit ab5a4f1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build/bin/sage-get-system-packages
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
SYSTEM=$1
if [ -z "$SYSTEM" ]; then
echo >&2 "usage: $0 {debian|arch|conda|pip|...} SPKGS..."
echo >&2 "usage: $0 {auto|debian|arch|conda|pip|...} SPKGS..."
exit 1
fi
shift
Expand Down Expand Up @@ -31,6 +31,13 @@ case "$SYSTEM" in
COLLECT=echo
;;
*)
if [ "$SYSTEM" = auto ]; then
SYSTEM=$(sage-guess-package-system 2>/dev/null)
if [ "$SYSTEM" = unknown ]; then
echo >&2 "unknown package system"
exit 1
fi
fi
SYSTEM_PACKAGES_FILE_NAMES="distros/$SYSTEM.txt"
STRIP_COMMENTS="sed s/#.*//;"
COLLECT=echo
Expand Down

0 comments on commit ab5a4f1

Please sign in to comment.