Return-Path: X-Original-To: apmail-pig-commits-archive@www.apache.org Delivered-To: apmail-pig-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D0C79E31 for ; Thu, 29 Sep 2011 22:45:12 +0000 (UTC) Received: (qmail 68041 invoked by uid 500); 29 Sep 2011 22:45:09 -0000 Delivered-To: apmail-pig-commits-archive@pig.apache.org Received: (qmail 68017 invoked by uid 500); 29 Sep 2011 22:45:09 -0000 Mailing-List: contact commits-help@pig.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@pig.apache.org Delivered-To: mailing list commits@pig.apache.org Received: (qmail 67976 invoked by uid 99); 29 Sep 2011 22:45:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 22:45:09 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2011 22:45:08 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 900042388A02 for ; Thu, 29 Sep 2011 22:44:48 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1177455 - in /pig/trunk: CHANGES.txt bin/pig Date: Thu, 29 Sep 2011 22:44:48 -0000 To: commits@pig.apache.org From: daijy@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20110929224448.900042388A02@eris.apache.org> Author: daijy Date: Thu Sep 29 22:44:48 2011 New Revision: 1177455 URL: http://svn.apache.org/viewvc?rev=1177455&view=rev Log: PIG-2310: bin/pig fail when both pig-0.9.1.jar and pig.jar are in PIG_HOME Modified: pig/trunk/CHANGES.txt pig/trunk/bin/pig Modified: pig/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/pig/trunk/CHANGES.txt?rev=1177455&r1=1177454&r2=1177455&view=diff ============================================================================== --- pig/trunk/CHANGES.txt (original) +++ pig/trunk/CHANGES.txt Thu Sep 29 22:44:48 2011 @@ -249,6 +249,8 @@ PIG-2221: Couldnt find documentation for BUG FIXES +PIG-2310: bin/pig fail when both pig-0.9.1.jar and pig.jar are in PIG_HOME (daijy) + PIG-1857: Create an package integration project (eyang via daijy) PIG-2013: Penny gets a null pointer when no properties are set (breed via daijy) Modified: pig/trunk/bin/pig URL: http://svn.apache.org/viewvc/pig/trunk/bin/pig?rev=1177455&r1=1177454&r2=1177455&view=diff ============================================================================== --- pig/trunk/bin/pig (original) +++ pig/trunk/bin/pig Thu Sep 29 22:44:48 2011 @@ -57,7 +57,7 @@ done this="${BASH_SOURCE-$0}" # convert relative path to absolute path -bin=$(cd -P -- "$(dirname -- "$this")" && pwd -P) +bin=$(cd -P -- "$(dirname -- "$this")">/dev/null && pwd -P) script="$(basename -- "$this")" this="$bin/$script" @@ -223,7 +223,11 @@ if [ -n "$HADOOP_BIN" ]; then echo "Find hadoop at $HADOOP_BIN" fi - PIG_JAR=`echo $PIG_HOME/pig-*withouthadoop.jar` + if [ -f $PIG_HOME/pig-withouthadoop.jar ]; then + PIG_JAR=$PIG_HOME/pig-withouthadoop.jar + else + PIG_JAR=`echo $PIG_HOME/pig-?.*withouthadoop.jar` + fi # for deb/rpm package, add pig jar in /usr/share/pig if [ -z "$PIG_JAR" ]; then @@ -255,7 +259,11 @@ else echo "Cannot find local hadoop installation, using bundled hadoop 20.2" fi - PIG_JAR=`echo $PIG_HOME/pig!(*withouthadoop).jar` + if [ -f $PIG_HOME/pig.jar ]; then + PIG_JAR=$PIG_HOME/pig.jar + else + PIG_JAR=`echo $PIG_HOME/pig-?.!(*withouthadoop).jar` + fi if [ -n "$PIG_JAR" ]; then CLASSPATH="${CLASSPATH}:$PIG_JAR"