gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leosim...@apache.org
Subject svn commit: r125365 - /gump/branches/Gump3/gump
Date Sun, 16 Jan 2005 20:46:06 GMT
Author: leosimons
Date: Sun Jan 16 12:46:05 2005
New Revision: 125365

URL: http://svn.apache.org/viewcvs?view=rev&rev=125365
Log:
Mac OS X says 'no  in ' so check for that. Also shift the argument to the usage function by
one so you can do 'gump help run' and the like
Modified:
   gump/branches/Gump3/gump

Modified: gump/branches/Gump3/gump
Url: http://svn.apache.org/viewcvs/gump/branches/Gump3/gump?view=diff&rev=125365&p1=gump/branches/Gump3/gump&r1=125364&p2=gump/branches/Gump3/gump&r2=125365
==============================================================================
--- gump/branches/Gump3/gump	(original)
+++ gump/branches/Gump3/gump	Sun Jan 16 12:46:05 2005
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 #
 # Copyright 2004-2005 The Apache Software Foundation
 #
@@ -225,7 +225,7 @@
   fi
   
   local hostnamecommand=`which hostname`
-  if [[ -z "$hostnamecommand" ]]; then
+  if [[ -z "$hostnamecommand" || "$hostnamecommand" == "no*" ]]; then
     error "GUMP_HOSTNAME is not set and the hostname command is not
 available to determine it!"
   fi
@@ -298,16 +298,19 @@
   fi
 
   local python=`which python2.4`
-  if [[ -z "$python" ]]; then
+  if [[ -z "$python" || "$python" == "no"* ]]; then
     python=`which python2.3`
   fi
-  if [[ -z "$python" ]]; then
+  if [[ -z "$python" || "$python" == "no"* ]]; then
+    python=`which python2.2`
+  fi
+  if [[ -z "$python" || "$python" == "no"* ]]; then
     python=`which python2`
   fi
-  if [[ -z "$python" ]]; then
+  if [[ -z "$python" || "$python" == "no"* ]]; then
     python=`which python`
   fi
-  if [[ -z "$python" ]]; then
+  if [[ -z "$python" || "$python" == "no"* ]]; then
     python="python" # hope for the best...
   fi
   
@@ -353,7 +356,7 @@
 function check_command
 {
   local cmd=`$GUMP_HOME/bin/PrintPath $1`;
-  if [[ -z "$cmd" ]]; then
+  if [[ -z "$cmd" && ! -x "$1" ]]; then
      error "Cannot find $1. Please retrieve it from 
 
      $2
@@ -419,7 +422,7 @@
 function check_environment
 {
   # PrintPath doesn't deal with absolute paths properly
-  #check_command $GUMP_PYTHON "http://www.python.org/"
+  check_command $GUMP_PYTHON "http://www.python.org/"
   #check_command "pkill" "http://sourceforge.net/projects/proctools"
   check_command "mysql" "http://www.mysql.com/"
   check_command "mysqladmin" "http://www.mysql.com/"
@@ -476,8 +479,8 @@
   find $GUMP_HOME/pygump -type f -name '*.pyc' | xargs rm -Rf
 
   # compile everything
-  $GUMP_PYTHON -c "import re; from compileall import compile_dir; compile_dir('$GUMP_HOME/pygump/python',
10, '$GUMP_HOME', False, re.compile('\.svn'), True)"  
-  
+  $GUMP_PYTHON -c "import re; from compileall import compile_dir; compile_dir('$GUMP_HOME/pygump/python',
10, '$GUMP_HOME', False, re.compile('\.svn'), True)"
+
   # add pygump to python path
   local oldpythonpath="$PYTHONPATH"
   if [[ -z "$oldpythonpath" ]]; then
@@ -738,6 +741,7 @@
 # when the user is asking for help...
 case $1 in
     help* | usage | --help | -help | -H | -h | '')
+      shift
       usage $@
       exit 0
 esac

Mime
View raw message