From 731b268cd6c76572cd5d66c27be254ccdb2952c6 Mon Sep 17 00:00:00 2001 From: Patrik Lundin Date: Sun, 15 Mar 2015 07:59:54 +0100 Subject: [PATCH] env-setup: Don't use ${.sh.file} if shell is pdksh The default ksh in OpenBSD throws the following error: === $ . hacking/env-setup ksh: hacking/env-setup[23]: ${.sh.file}": bad substitution [...] === The same error can be seen on Linux if pdksh is used. --- hacking/env-setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hacking/env-setup b/hacking/env-setup index 9b9a529d13a..16baa9b1b75 100644 --- a/hacking/env-setup +++ b/hacking/env-setup @@ -16,7 +16,7 @@ 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 +elif [ -n "$KSH_VERSION" ] && echo $KSH_VERSION | grep -qv '^@(#)PD KSH'; then HACKING_DIR=$(dirname "${.sh.file}") else HACKING_DIR="$PWD/hacking"