Repository: sqoop Updated Branches: refs/heads/sqoop2 d3fbe102a -> 051207da9
SQOOP-2605. Sqoop2: Allow to override location of configuration directory (Jarcec via Hari) Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/051207da Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/051207da Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/051207da Branch: refs/heads/sqoop2 Commit: 051207da93789d80c830eba2b7e1985317d81d47 Parents: d3fbe10 Author: Hari Shreedharan <[email protected]> Authored: Thu Oct 8 12:16:15 2015 -0700 Committer: Hari Shreedharan <[email protected]> Committed: Thu Oct 8 12:16:15 2015 -0700 ---------------------------------------------------------------------- dist/src/main/bin/sqoop.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/sqoop/blob/051207da/dist/src/main/bin/sqoop.sh ---------------------------------------------------------------------- diff --git a/dist/src/main/bin/sqoop.sh b/dist/src/main/bin/sqoop.sh index 1bc046f..71994bd 100755 --- a/dist/src/main/bin/sqoop.sh +++ b/dist/src/main/bin/sqoop.sh @@ -116,12 +116,17 @@ while [ -h "${PRG}" ]; do fi done +# Default configuration directory is relatively +DEFAULT_SQOOP_CONF_DIR=`dirname $0`/../conf +SQOOP_CONF_DIR=${SQOOP_CONF_DIR:-$DEFAULT_SQOOP_CONF_DIR} +echo "Setting conf dir: $SQOOP_CONF_DIR" + BASEDIR=`dirname ${PRG}` BASEDIR=`cd ${BASEDIR}/..;pwd` SQOOP_IDENT_STRING=${SQOOP_IDENT_STRING:-$USER} SQOOP_PID_DIR=${SQOOP_PID_DIR:-/tmp} sqoop_pidfile="${SQOOP_PID_DIR}/sqoop-${SQOOP_IDENT_STRING}-jetty-server.pid" -JAVA_OPTS="$JAVA_OPTS -Dsqoop.config.dir=`dirname $0`/../conf" +JAVA_OPTS="$JAVA_OPTS -Dsqoop.config.dir=$SQOOP_CONF_DIR" echo "Sqoop home directory: ${BASEDIR}"
