summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS.d/next/Build/2024-06-09-15-54-22.gh-issue-120291.IpfHzE.rst1
-rw-r--r--Misc/python-config.sh.in9
2 files changed, 6 insertions, 4 deletions
diff --git a/Misc/NEWS.d/next/Build/2024-06-09-15-54-22.gh-issue-120291.IpfHzE.rst b/Misc/NEWS.d/next/Build/2024-06-09-15-54-22.gh-issue-120291.IpfHzE.rst
new file mode 100644
index 0000000..d0bb297
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2024-06-09-15-54-22.gh-issue-120291.IpfHzE.rst
@@ -0,0 +1 @@
+Make the ``python-config`` shell script compatible with non-bash shells.
diff --git a/Misc/python-config.sh.in b/Misc/python-config.sh.in
index c3c0b34..9929f5b 100644
--- a/Misc/python-config.sh.in
+++ b/Misc/python-config.sh.in
@@ -4,11 +4,12 @@
exit_with_usage ()
{
- local USAGE="Usage: $0 --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--abiflags|--configdir|--embed"
- if [[ "$1" -eq 0 ]]; then
- echo "$USAGE"
+ local usage
+ usage="Usage: $0 --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--abiflags|--configdir|--embed"
+ if [ "$1" -eq 0 ]; then
+ echo "$usage"
else
- echo "$USAGE" >&2
+ echo "$usage" >&2
fi
exit $1
}