From 80b45fb3220bedab9c42d4d9fe27cdce876a6075 Mon Sep 17 00:00:00 2001 From: Pavlos Ratis Date: Wed, 14 May 2014 21:46:05 +0300 Subject: [PATCH] add zsh support in testpath --- testpath | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/testpath b/testpath index b1bc173..3bf8bde 100644 --- a/testpath +++ b/testpath @@ -11,7 +11,10 @@ # $ 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 -- 2.26.2