]> gitweb.michael.orlitzky.com - shell.d.git/commitdiff
sage.sh: posix sh (or dash, at least) compatibility hack
authorMichael Orlitzky <michael@orlitzky.com>
Wed, 25 Feb 2026 03:12:24 +0000 (22:12 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Wed, 25 Feb 2026 03:12:24 +0000 (22:12 -0500)
sage.sh

diff --git a/sage.sh b/sage.sh
index 4ce68e4c2a58459a429be079092272919ccdc133..bca684b0c993675524c3bec55def68f161c2eab3 100644 (file)
--- a/sage.sh
+++ b/sage.sh
@@ -22,7 +22,7 @@ alias sage="python -m sage.cli"
 #
 #   https://github.com/mesonbuild/meson-python/issues/820
 #
-sage-meson-setup() {
+sage_meson_setup() {
     meson setup \
          --python.bytecompile=-1 \
          --python.install-env=prefix \
@@ -36,8 +36,13 @@ sage-meson-setup() {
 # A "meson install" command that passes --only-changed by default.
 # This makes a huge difference in the install time as we have >= 5k
 # files to install.
-sage-meson-install() {
+sage_meson_install() {
     meson install \
          --only-changed \
          "${@}"
 }
+
+# I prefer the hyphens, but they aren't valid in a sh function name
+# (dash objects to them).
+alias sage-meson-setup=sage_meson_setup
+alias sage-meson-install=sage_meson_install