We should make PIG_HOME configurable. Can you create a jira and upload a patch?
Thanks, Rohini On Sat, Mar 2, 2013 at 6:14 PM, Robert <[email protected]> wrote: > It looks like the pig shell script in v0.11 exports PIG_HOME without first > checking to see if it already exists. > > from line 78 in <path>/bin/pig: > # the root of the Pig installation > export PIG_HOME=`dirname "$this"`/.. > > Going through the script it appears most env variables are checked prior > to setting, but not this one. Is there a reason why? > > Background: I ask this because I was getting an error resolving the path > to pig.jar. From what I gather it is because I use a symbolic link in > /usr/local/bin to the pig script instead of modifying my PATH. This meant > `$this` in the bash script returned the path to /usr/local/bin instead of > /usr/local/pig-0.11.0/bin. > > I modified my local version to the following: > > # the root of the Pig installation > if [ -z "$PIG_HOME" ]; then > export PIG_HOME=`dirname "$this"`/.. > fi > > Is this something the script should have in it, or am I operating outside > of the expected scenario? > > Thanks, > Robert
