add zsh support in testpath
authorPavlos Ratis <dastergon@gentoo.org>
Wed, 14 May 2014 18:46:05 +0000 (21:46 +0300)
committerPavlos Ratis <dastergon@gentoo.org>
Mon, 19 May 2014 09:49:04 +0000 (12:49 +0300)
testpath

index b1bc173298b2c2010c5b8959e8d073cae3dab16c..3bf8bde1eaf76bd4c9b6efb781707b571762eee3 100644 (file)
--- a/testpath
+++ b/testpath
 # $ source ./testpath
 # $ esearch some-package
 
-
-export PATH="$(dirname $BASH_SOURCE[0])/../pyGPG/bin:$(dirname $BASH_SOURCE[0])/bin:${PATH}"
-
-export PYTHONPATH="$(dirname $BASH_SOURCE[0])/../pyGPG/:$(dirname $BASH_SOURCE[0])/../ssl-fetch/:$(dirname $BASH_SOURCE[0])/:${PYTHONPATH}"
+if [[ "$SHELL" =~ "zsh" ]]; then
+    export PATH="$(dirname $0)/../pyGPG/bin:$(dirname $0)/bin:${PATH}"
+    export PYTHONPATH="$(dirname $0)/../pyGPG/:$(dirname $0)/../ssl-fetch/:$(dirname $0)/:${PYTHONPATH}"
+else
+    export PATH="$(dirname $BASH_SOURCE[0])/../pyGPG/bin:$(dirname $BASH_SOURCE[0])/bin:${PATH}"
+    export PYTHONPATH="$(dirname $BASH_SOURCE[0])/../pyGPG/:$(dirname $BASH_SOURCE[0])/../ssl-fetch/:$(dirname $BASH_SOURCE[0])/:${PYTHONPATH}"
+fi