sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hshreedha...@apache.org
Subject git commit: SQOOP-1264. Sqoop2: Remove unnecessary cd command calls from sqoop.sh
Date Thu, 02 Jan 2014 17:17:55 GMT
Updated Branches:
  refs/heads/sqoop2 39e26f260 -> ad93e2a5e


SQOOP-1264. Sqoop2: Remove unnecessary cd command calls from sqoop.sh

(Jarek Jarcec Cecho via Hari Shreedharan)


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

Branch: refs/heads/sqoop2
Commit: ad93e2a5e89ff1d434059a32c20bc53b5c4d4175
Parents: 39e26f2
Author: Hari Shreedharan <hshreedharan@apache.org>
Authored: Thu Jan 2 09:17:17 2014 -0800
Committer: Hari Shreedharan <hshreedharan@apache.org>
Committed: Thu Jan 2 09:17:17 2014 -0800

----------------------------------------------------------------------
 dist/src/main/bin/sqoop.sh | 15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/ad93e2a5/dist/src/main/bin/sqoop.sh
----------------------------------------------------------------------
diff --git a/dist/src/main/bin/sqoop.sh b/dist/src/main/bin/sqoop.sh
index 9aad029..d4298a2 100755
--- a/dist/src/main/bin/sqoop.sh
+++ b/dist/src/main/bin/sqoop.sh
@@ -29,8 +29,6 @@ if [ $# = 0 ]; then
   exit
 fi
 
-OLD_DIR=`pwd`
-
 # resolve links - $0 may be a softlink
 PRG="${0}"
 
@@ -47,11 +45,10 @@ 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:-shell/lib}
+CATALINA_BIN=${CATALINA_BIN:-${BASEDIR}/server/bin}
+CLIENT_LIB=${CLIENT_LIB:-${BASEDIR}/shell/lib}
 
 setup_catalina_opts() {
   # The Java System properties 'sqoop.http.port' and 'sqoop.admin.port' are
@@ -110,13 +107,9 @@ case $COMMAND in
   client)
     # Build class path with full path to each library
     for f in $CLIENT_LIB/*.jar; do
-      CLASSPATH="${CLASSPATH}:${BASEDIR}/$f"
+      CLASSPATH="${CLASSPATH}:$f"
     done
 
-    # We need to change current directory back to original as optional user side script
-    # might be specified with relative path.
-    cd ${OLD_DIR}
-
     EXEC_JAVA='java'
     if [ -n "${JAVA_HOME}" ] ; then
         EXEC_JAVA="${JAVA_HOME}/bin/java"
@@ -128,5 +121,3 @@ case $COMMAND in
     echo "Command is not recognized."
     ;;
 esac
-
-cd ${OLD_DIR}


Mime
View raw message