From c59c3e41fe9a5c7d2af3c576661d9b64e66a4dca Mon Sep 17 00:00:00 2001
From: Jamil <jamil@jlab.org>
Date: Thu, 16 May 2013 14:10:19 -0400
Subject: [PATCH] modified to work with .cshrc

---
 setup.csh | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/setup.csh b/setup.csh
index 83155fc..d85dc0c 100644
--- a/setup.csh
+++ b/setup.csh
@@ -3,11 +3,12 @@
 set called=($_)
 if ("$called" != "") then
   set scriptdir=$called[2]
+  set MYDIR=`dirname $scriptdir`
+  set MYDIR=`cd $MYDIR && pwd`    # ensure absolute path
 else
-  set scriptdir=$0
+  set scriptdir=$1
+  set MYDIR=$scriptdir
 endif
-set MYDIR=`dirname $scriptdir`
-set MYDIR=`cd $MYDIR && pwd`    # ensure absolute path
 setenv ANALYZER $MYDIR/podd
 setenv HCANALYZER $MYDIR
 # Check if LD_LIBRARY_PATH is defined
-- 
GitLab