hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r425666 - /lucene/hadoop/trunk/bin/hadoop-config.sh
Date Wed, 26 Jul 2006 08:11:39 GMT
Author: cutting
Date: Wed Jul 26 01:11:38 2006
New Revision: 425666

URL: http://svn.apache.org/viewvc?rev=425666&view=rev
Log:
HADOOP-388.  Fix scripts to work when run from a relative directory.  Contributed by Owen.

Modified:
    lucene/hadoop/trunk/bin/hadoop-config.sh

Modified: lucene/hadoop/trunk/bin/hadoop-config.sh
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/bin/hadoop-config.sh?rev=425666&r1=425665&r2=425666&view=diff
==============================================================================
--- lucene/hadoop/trunk/bin/hadoop-config.sh (original)
+++ lucene/hadoop/trunk/bin/hadoop-config.sh Wed Jul 26 01:11:38 2006
@@ -3,7 +3,10 @@
 # also should not be passed any arguments, since we need original $*
 
 # resolve links - $0 may be a softlink
-this="$0"
+bin=`dirname "$0"`
+script=`basename "$0"`
+bin=`cd "$bin"; pwd`
+this="$bin/$script"
 while [ -h "$this" ]; do
   ls=`ls -ld "$this"`
   link=`expr "$ls" : '.*-> \(.*\)$'`



Mime
View raw message