/[escript]/trunk/bin/run-escript
ViewVC logotype

Diff of /trunk/bin/run-escript

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3059 by jfenwick, Tue Jul 6 03:31:48 2010 UTC revision 3162 by jfenwick, Tue Sep 7 05:29:32 2010 UTC
# Line 41  else Line 41  else
41    else    else
42        # name does not contain / therefore we are using        # name does not contain / therefore we are using
43        tscriptdir=`which $0`        tscriptdir=`which $0`
44        if [ $? != 0 ]        if [ $? -ne 0 ]
45        then        then
46            echo "Error! Unable to determine script directory. Exiting."            echo "Error! Unable to determine script directory. Exiting."
47            exit 1            exit 1
# Line 84  then Line 84  then
84      EXTRA_PYTHONPATH=$ESCRIPT_PARENT/pkg/numpy/lib/python2.6/site-packages:$ESCRIPT_PARENT/pkg/matplotlib/lib/python2.6/site-packages:$EXTRA_PYTHONPATH      EXTRA_PYTHONPATH=$ESCRIPT_PARENT/pkg/numpy/lib/python2.6/site-packages:$ESCRIPT_PARENT/pkg/matplotlib/lib/python2.6/site-packages:$EXTRA_PYTHONPATH
85  fi  fi
86    
87    #
88    #   Add VisIt paths if required
89    #
90    WITH_VISIT=`grep usevisit $ESCRIPT_ROOT/lib/buildvars |cut -d= -f2`
91    if [ "$WITH_VISIT" = "y" ]; then
92        VISIT_BIN=`which visit`
93        if [ $? -eq 0 ]; then
94            VISIT_PY_PATH=`$VISIT_BIN -env | grep LIBPATH | cut -d= -f2`
95            EXTRA_PYTHONPATH=$EXTRA_PYTHONPATH:$VISIT_PY_PATH
96            EXTRA_LD_LIBRARY_PATH=$EXTRA_LD_LIBRARY_PATH:$VISIT_PY_PATH
97        elif [ ! -z $ESCRIPT_VERBOSE ]; then
98            echo "VisIt module enabled but VisIt not in path!"
99        fi
100    fi
101    
102  HELP_TEXT="  HELP_TEXT="
103  Usage: escript [options] script.py [arguments...]  Usage: escript [options] script.py [arguments...]
# Line 320  then Line 333  then
333    then    then
334      echo "No program to run was specified. Exiting."      echo "No program to run was specified. Exiting."
335      exit 1      exit 1
336      else
337        DOINTERACTIVE="yes"
338    fi    fi
339  fi  fi
 if [ -z "$@" ]  
 then  
    if [ ! -z $DOBINARY ]  
    then  
        echo "Program must be given."  
        exit 1  
    else  
       DOINTERACTIVE="yes"  
    fi  
 fi  
340    
341  #=========================================================================================================  #=========================================================================================================
342  if [ ! -z $DOBINARY ]  if [ ! -z $DOBINARY ]
# Line 345  else Line 350  else
350          if [ -f $ESCRIPT_ROOT/lib/pyversion ]          if [ -f $ESCRIPT_ROOT/lib/pyversion ]
351          then          then
352             compversion=`cat $ESCRIPT_ROOT/lib/pyversion`             compversion=`cat $ESCRIPT_ROOT/lib/pyversion`
353             intversion=`$PYTHON_CMD -V 2>&1`         intversion=`$PYTHON_CMD -c 'import sys;print "%d.%d.%d"%(sys.version_info[0], sys.version_info[1], sys.version_info[2])'`
354             if [ "$compversion" != "$intversion" ]             if [ "$compversion" != "$intversion" ]
355             then             then
356                echo "Python versions do not match. Escript was compiled for "$compversion"."                echo "Python versions do not match. Escript was compiled for "$compversion"."

Legend:
Removed from v.3059  
changed lines
  Added in v.3162

  ViewVC Help
Powered by ViewVC 1.1.26