commit:     7e62b8fb14bc6e1392815d8c3d065c868eb31688
Author:     Angel Perivolaropoulos <justthisthing <AT> gmail <DOT> com>
AuthorDate: Thu Jun 30 16:02:43 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 16:06:57 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=7e62b8fb

testpath:  Add zsh support

 testpath | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/testpath b/testpath
index 144387d..7a66fd64 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

Reply via email to