diff options
-rw-r--r-- | hacking/env-setup | 1 | ||||
-rw-r--r-- | v2/hacking/env-setup | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/hacking/env-setup b/hacking/env-setup index 16baa9b1b7..f52c91a8b9 100644 --- a/hacking/env-setup +++ b/hacking/env-setup @@ -16,6 +16,7 @@ if [ -n "$BASH_SOURCE" ] ; then HACKING_DIR=$(dirname "$BASH_SOURCE") elif [ $(basename -- "$0") = "env-setup" ]; then HACKING_DIR=$(dirname "$0") +# Works with ksh93 but not pdksh elif [ -n "$KSH_VERSION" ] && echo $KSH_VERSION | grep -qv '^@(#)PD KSH'; then HACKING_DIR=$(dirname "${.sh.file}") else diff --git a/v2/hacking/env-setup b/v2/hacking/env-setup index fed8e892fd..c03fa0874e 100644 --- a/v2/hacking/env-setup +++ b/v2/hacking/env-setup @@ -16,7 +16,8 @@ if [ -n "$BASH_SOURCE" ] ; then HACKING_DIR=$(dirname "$BASH_SOURCE") elif [ $(basename -- "$0") = "env-setup" ]; then HACKING_DIR=$(dirname "$0") -elif [ -n "$KSH_VERSION" ]; then +# Works with ksh93 but not pdksh +elif [ -n "$KSH_VERSION" ] && echo $KSH_VERSION | grep -qv '^@(#)PD KSH'; then HACKING_DIR=$(dirname "${.sh.file}") else HACKING_DIR="$PWD/hacking" |