pig-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject svn commit: r1177454 - in /pig/branches/branch-0.9: CHANGES.txt bin/pig
Date Thu, 29 Sep 2011 22:44:15 GMT
Author: daijy
Date: Thu Sep 29 22:44:14 2011
New Revision: 1177454

URL: http://svn.apache.org/viewvc?rev=1177454&view=rev
Log:
PIG-2310: bin/pig fail when both pig-0.9.1.jar and pig.jar are in PIG_HOME

Modified:
    pig/branches/branch-0.9/CHANGES.txt
    pig/branches/branch-0.9/bin/pig

Modified: pig/branches/branch-0.9/CHANGES.txt
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.9/CHANGES.txt?rev=1177454&r1=1177453&r2=1177454&view=diff
==============================================================================
--- pig/branches/branch-0.9/CHANGES.txt (original)
+++ pig/branches/branch-0.9/CHANGES.txt Thu Sep 29 22:44:14 2011
@@ -40,6 +40,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/branches/branch-0.9/bin/pig
URL: http://svn.apache.org/viewvc/pig/branches/branch-0.9/bin/pig?rev=1177454&r1=1177453&r2=1177454&view=diff
==============================================================================
--- pig/branches/branch-0.9/bin/pig (original)
+++ pig/branches/branch-0.9/bin/pig Thu Sep 29 22:44:14 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"



Mime
View raw message