Return-Path: Delivered-To: apmail-gump-commits-archive@www.apache.org Received: (qmail 5024 invoked from network); 16 Jan 2005 20:46:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 16 Jan 2005 20:46:09 -0000 Received: (qmail 75703 invoked by uid 500); 16 Jan 2005 20:46:09 -0000 Mailing-List: contact commits-help@gump.apache.org; run by ezmlm Precedence: bulk Reply-To: commits@gump.apache.org List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@gump.apache.org Received: (qmail 75690 invoked by uid 99); 16 Jan 2005 20:46:08 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Sun, 16 Jan 2005 12:46:07 -0800 Received: (qmail 4990 invoked by uid 65534); 16 Jan 2005 20:46:06 -0000 Date: 16 Jan 2005 20:46:06 -0000 Message-ID: <20050116204606.4988.qmail@minotaur.apache.org> From: leosimons@apache.org To: commits@gump.apache.org Subject: svn commit: r125365 - /gump/branches/Gump3/gump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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