[Swift-commit] r2574 - SwiftApps/adem-osg

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Wed Feb 18 15:26:09 CST 2009


Author: houzx
Date: 2009-02-18 15:26:09 -0600 (Wed, 18 Feb 2009)
New Revision: 2574

Added:
   SwiftApps/adem-osg/setup.csh
Log:
New setup.csh import

Added: SwiftApps/adem-osg/setup.csh
===================================================================
--- SwiftApps/adem-osg/setup.csh	                        (rev 0)
+++ SwiftApps/adem-osg/setup.csh	2009-02-18 21:26:09 UTC (rev 2574)
@@ -0,0 +1,69 @@
+#!/bin/csh
+#
+# set-up environment to run Adem - source me
+#
+
+dir=`basename ${PWD}`
+Def_Rep="http://www.ci.uchicago.edu/~houzx/pac-cache"
+
+if ("X${GLOBUS_LOCATION}" == "X") then
+   echo "NO GLOBUS Error!"
+ else if (${dir} != "adem-osg") then
+   echo "Please cd to adem-osg for first setup!"
+   
+   else if ("X${ADEM_HOME}" == "X") then
+   echo "setenv ADEM_HOME ${PWD}" >> ${HOME}/.cshrc
+   echo "setenv PATH ${PATH}:${PWD}/bin" >> ${HOME}/.cshrc
+      else if ("${ADEM_HOME}" != "${PWD}") then
+      sed -i "s,${ADEM_HOME},${PWD},g" ${HOME}/.cshrc
+      endif 
+#   source ${HOME}/.cshrc
+   endif
+ endif
+endif
+
+#check the grid proxy
+grid-proxy-info 1>/dev/null 2>/dev/null
+if ("$?" != 0) then
+  echo "ERROR: Couldn not find a valid proxy, Please check your grid proxy!"
+  exit 1
+  else
+  {
+  timel=`grid-proxy-info  |grep timeleft |cut -d: -f2`
+  if ("$timel" -lt 1) then
+  echo "Proxy has less than 60 minutes remainging - exiting."
+  exit
+  endif
+  }
+endif
+
+#check pacman
+if ("X${PACMAN_LOCATION}" == "X") then
+  /bin/tar -C ${ADEM_HOME}  -zxf ${ADEM_HOME}/doc/pacman-3.21.tar.gz
+  DIR=${PWD}
+  cd ${ADEM_HOME}/pacman-3.21
+  source setup.csh 2>/dev/null
+  cd ${DIR}
+  echo "DIR=${PWD}" >> ${ADEM_HOME}/pac-set.csh  
+  echo "cd ${ADEM_HOME}/pacman-3.21" >> ${ADEM_HOME}/pac-set.csh
+  echo "source setup.sh 2>/dev/null" >> ${ADEM_HOME}/pac-set.csh
+  echo "cd ${DIR}" >> ${ADEM_HOME}/pac-set.csh
+  echo "source ${ADEM_HOME}/pac-set.csh" >>  $HOME/.cshrc
+endif
+
+#check application software repository
+if ("X${REPOSITORY_HOME}" == "X") then
+   echo "The default application software repository is:"
+   echo "${Def_Rep}"
+   echo "Do you want to set up your own repository?y or n"
+   read response
+   if ("${response}" == "y") then
+   echo "Please input your own application software repository:"
+   read rep
+   echo "OK, you should maintain your own repository, to add,update,or remove the pacman files and software packages."
+   echo "setenv REPOSITORY_HOME ${rep}" >> ${HOME}/.cshrc
+   else
+   echo "setenv REPOSITORY_HOME ${Def_Rep}" >> ${HOME}/.cshrc
+   endif
+   source ${HOME}/.cshrc
+endif


Property changes on: SwiftApps/adem-osg/setup.csh
___________________________________________________________________
Name: svn:executable
   + 




More information about the Swift-commit mailing list