sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject git commit: SQOOP-1003: Sqoop2: sqoop.sh execution error
Date Fri, 03 May 2013 05:26:31 GMT
Updated Branches:
  refs/heads/sqoop2 810724860 -> 01ffb2f42


SQOOP-1003: Sqoop2: sqoop.sh execution error

(Vasanth kumar RJ via Jarek Jarcec Cecho)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/01ffb2f4
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/01ffb2f4
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/01ffb2f4

Branch: refs/heads/sqoop2
Commit: 01ffb2f4282b6fac7fa05d6a8f8b4ec0feb76082
Parents: 8107248
Author: Jarek Jarcec Cecho <jarcec@cloudera.com>
Authored: Thu May 2 22:25:42 2013 -0700
Committer: Jarek Jarcec Cecho <jarcec@cloudera.com>
Committed: Thu May 2 22:25:42 2013 -0700

----------------------------------------------------------------------
 dist/src/main/bin/sqoop.sh |   40 +++++++++++++++++++-------------------
 1 files changed, 20 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/01ffb2f4/dist/src/main/bin/sqoop.sh
----------------------------------------------------------------------
diff --git a/dist/src/main/bin/sqoop.sh b/dist/src/main/bin/sqoop.sh
index a218441..9f07bb1 100755
--- a/dist/src/main/bin/sqoop.sh
+++ b/dist/src/main/bin/sqoop.sh
@@ -30,9 +30,25 @@ if [ $# = 0 ]; then
 fi
 
 OLD_DIR=`pwd`
-CUR_DIR=`cd $(dirname $(which $0))/..; pwd`
-cd ${CUR_DIR}
-echo "Sqoop home directory: ${CUR_DIR}..."
+
+# resolve links - $0 may be a softlink
+PRG="${0}"
+
+while [ -h "${PRG}" ]; do
+  ls=`ls -ld "${PRG}"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "${PRG}"`/"$link"
+  fi
+done
+
+BASEDIR=`dirname ${PRG}`
+BASEDIR=`cd ${BASEDIR}/..;pwd`
+
+cd ${BASEDIR}
+echo "Sqoop home directory: ${BASEDIR}"
 
 CATALINA_BIN=${CATALINA_BIN:-server/bin}
 CLIENT_LIB=${CLIENT_LIB:-client/lib}
@@ -59,22 +75,6 @@ case $COMMAND in
     fi
     actionCmd=$2
 
-    # resolve links - $0 may be a softlink
-    PRG="${0}"
-
-    while [ -h "${PRG}" ]; do
-      ls=`ls -ld "${PRG}"`
-      link=`expr "$ls" : '.*-> \(.*\)$'`
-      if expr "$link" : '/.*' > /dev/null; then
-        PRG="$link"
-      else
-        PRG=`dirname "${PRG}"`/"$link"
-      fi
-    done
-
-    BASEDIR=`dirname ${PRG}`
-    BASEDIR=`cd ${BASEDIR}/..;pwd`
-
     source ${BASEDIR}/bin/sqoop-sys.sh
     setup_catalina_opts
 
@@ -96,7 +96,7 @@ case $COMMAND in
   client)
     # Build class path with full path to each library
     for f in $CLIENT_LIB/*.jar; do
-      CLASSPATH="${CLASSPATH}:$CUR_DIR/$f"
+      CLASSPATH="${CLASSPATH}:${BASEDIR}/$f"
     done
 
     # We need to change current directory back to original as optional user side script


Mime
View raw message