mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-03-31 15:53:09 +00:00
Replace external command with shell construct
dirname/basename do not need an external process, shell variable expansion can be made to do the same a bit faster. Signed-off-by: martin f. krafft <madduck@madduck.net>
This commit is contained in:
@@ -14,7 +14,7 @@ esac
|
||||
# The below is an alternative to readlink -fn which doesn't exist on OS X
|
||||
# Source: http://stackoverflow.com/a/1678636
|
||||
FULL_PATH=`python -c "import os; print(os.path.realpath('$HACKING_DIR'))"`
|
||||
ANSIBLE_HOME=`dirname "$FULL_PATH"`
|
||||
ANSIBLE_HOME=${FULL_PATH%/*}
|
||||
|
||||
PREFIX_PYTHONPATH="$ANSIBLE_HOME/lib"
|
||||
PREFIX_PATH="$ANSIBLE_HOME/bin"
|
||||
|
||||
Reference in New Issue
Block a user