summaryrefslogtreecommitdiff
path: root/hacking
diff options
context:
space:
mode:
Diffstat (limited to 'hacking')
-rwxr-xr-xhacking/env-setup2
1 files changed, 1 insertions, 1 deletions
diff --git a/hacking/env-setup b/hacking/env-setup
index 38c372a79a..aedd078726 100755
--- a/hacking/env-setup
+++ b/hacking/env-setup
@@ -5,7 +5,7 @@
# When run using source as directed, $0 gets set to bash, so we must use $BASH_SOURCE
if [ -n "$BASH_SOURCE" ] ; then
HACKING_DIR=`dirname $BASH_SOURCE`
-elif [ ${0:(-9)} = "env-setup" ]; then
+elif [ $(basename $0) = "env-setup" ]; then
HACKING_DIR=`dirname $0`
else
HACKING_DIR="$PWD/hacking"