summaryrefslogtreecommitdiffstats
path: root/hacking/env-setup.fish
diff options
context:
space:
mode:
Diffstat (limited to 'hacking/env-setup.fish')
-rw-r--r--hacking/env-setup.fish19
1 files changed, 9 insertions, 10 deletions
diff --git a/hacking/env-setup.fish b/hacking/env-setup.fish
index 53d17b3235..a5fe291fe9 100644
--- a/hacking/env-setup.fish
+++ b/hacking/env-setup.fish
@@ -4,16 +4,16 @@
set HACKING_DIR (dirname (status -f))
set FULL_PATH (python -c "import os; print(os.path.realpath('$HACKING_DIR'))")
set ANSIBLE_HOME (dirname $FULL_PATH)
-set PREFIX_PYTHONPATH $ANSIBLE_HOME/lib
-set PREFIX_PATH $ANSIBLE_HOME/bin
+set PREFIX_PYTHONPATH $ANSIBLE_HOME/lib
+set PREFIX_PATH $ANSIBLE_HOME/bin
set PREFIX_MANPATH $ANSIBLE_HOME/docs/man
# set quiet flag
-if set -q argv
+if test (count $argv) -ge 1
switch $argv
- case '-q' '--quiet'
- set QUIET "true"
- case '*'
+ case '-q' '--quiet'
+ set QUIET "true"
+ case '*'
end
end
@@ -49,15 +49,14 @@ set -gx ANSIBLE_LIBRARY $ANSIBLE_HOME/library
# Generate egg_info so that pkg_resources works
pushd $ANSIBLE_HOME
+if test -e $PREFIX_PYTHONPATH/ansible*.egg-info
+ rm -r $PREFIX_PYTHONPATH/ansible*.egg-info
+end
if [ $QUIET ]
python setup.py -q egg_info
else
python setup.py egg_info
end
-if test -e $PREFIX_PYTHONPATH/ansible*.egg-info
- rm -r $PREFIX_PYTHONPATH/ansible*.egg-info
-end
-mv ansible*egg-info $PREFIX_PYTHONPATH
find . -type f -name "*.pyc" -delete
popd