mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pdksh fix to v2
This commit is contained in:
parent
27be0421c0
commit
caf2a96ef9
2 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,7 @@ if [ -n "$BASH_SOURCE" ] ; then
|
||||||
HACKING_DIR=$(dirname "$BASH_SOURCE")
|
HACKING_DIR=$(dirname "$BASH_SOURCE")
|
||||||
elif [ $(basename -- "$0") = "env-setup" ]; then
|
elif [ $(basename -- "$0") = "env-setup" ]; then
|
||||||
HACKING_DIR=$(dirname "$0")
|
HACKING_DIR=$(dirname "$0")
|
||||||
|
# Works with ksh93 but not pdksh
|
||||||
elif [ -n "$KSH_VERSION" ] && echo $KSH_VERSION | grep -qv '^@(#)PD KSH'; then
|
elif [ -n "$KSH_VERSION" ] && echo $KSH_VERSION | grep -qv '^@(#)PD KSH'; then
|
||||||
HACKING_DIR=$(dirname "${.sh.file}")
|
HACKING_DIR=$(dirname "${.sh.file}")
|
||||||
else
|
else
|
||||||
|
|
|
@ -16,7 +16,8 @@ if [ -n "$BASH_SOURCE" ] ; then
|
||||||
HACKING_DIR=$(dirname "$BASH_SOURCE")
|
HACKING_DIR=$(dirname "$BASH_SOURCE")
|
||||||
elif [ $(basename -- "$0") = "env-setup" ]; then
|
elif [ $(basename -- "$0") = "env-setup" ]; then
|
||||||
HACKING_DIR=$(dirname "$0")
|
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}")
|
HACKING_DIR=$(dirname "${.sh.file}")
|
||||||
else
|
else
|
||||||
HACKING_DIR="$PWD/hacking"
|
HACKING_DIR="$PWD/hacking"
|
||||||
|
|
Loading…
Reference in a new issue