aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngel Perivolaropoulos <justthisthing@gmail.com>2016-06-30 09:02:43 -0700
committerBrian Dolbec <dolsen@gentoo.org>2016-06-30 09:06:57 -0700
commit7e62b8fb14bc6e1392815d8c3d065c868eb31688 (patch)
tree761f7f6a2846e35330f48abd47c415bb2fbc6147 /testpath
parentrepoman: Make LIVEVCS.* checks fatal (diff)
downloadportage-7e62b8fb14bc6e1392815d8c3d065c868eb31688.tar.gz
portage-7e62b8fb14bc6e1392815d8c3d065c868eb31688.tar.bz2
portage-7e62b8fb14bc6e1392815d8c3d065c868eb31688.zip
testpath: Add zsh support
Diffstat (limited to 'testpath')
-rw-r--r--testpath10
1 files changed, 7 insertions, 3 deletions
diff --git a/testpath b/testpath
index 144387dca..7a66fd647 100644
--- a/testpath
+++ b/testpath
@@ -6,6 +6,10 @@
# emerge foo
# repoman manifest
# ...
-export PATH="$(dirname ${BASH_SOURCE[0]})/bin:${PATH}"
-export PYTHONPATH=PYTHONPATH="$(dirname $BASH_SOURCE[0])/pym:${PYTHONPATH:+:}${PYTHONPATH}"
-export PYTHONWARNINGS=d,i::ImportWarning
+if [[ "$SHELL" =~ "zsh" ]]; then
+ export PATH="$(dirname $0)/bin:${PATH}"
+ export PYTHONPATH=PYTHONPATH="$(dirname $0)/pym:${PYTHONPATH:+:}${PYTHONPATH}"
+else
+ export PATH="$(dirname ${BASH_SOURCE[0]})/bin:${PATH}"
+ export PYTHONPATH=PYTHONPATH="$(dirname $BASH_SOURCE[0])/pym:${PYTHONPATH:+:}${PYTHONPATH}"
+fiexport PYTHONWARNINGS=d,i::ImportWarning