modulecmd: derive prefix from location of script

This commit is contained in:
2025-01-09 10:34:05 +01:00
parent 06565b4f39
commit 68b411894c
2 changed files with 12 additions and 13 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
#!/bin/sh
unset BASH_ENV
"${PMODULES_HOME}/libexec/bash" --noprofile --norc "${PMODULES_HOME}/libexec/modulecmd.bash" "$@"
origin="${BASH_SOURCE[0]%/*}"
"${origin}/../libexec/bash" --noprofile --norc "${origin}/../libexec/modulecmd.bash" "$@"