diff --git hcatalog/bin/hcat hcatalog/bin/hcat index 455f108..6795b1f 100644 --- hcatalog/bin/hcat +++ hcatalog/bin/hcat @@ -60,7 +60,8 @@ done # check for hive in the path HIVE_IN_PATH=`which hive 2>/dev/null` -if [ -f ${HIVE_IN_PATH} ]; then +# looks like [ -f '' ] is true... +if [ -n ${HIVE_IN_PATH} ]; then #dir of hive scrip HIVE_DIR=`dirname "$HIVE_IN_PATH"` #one level up for base dir @@ -70,8 +71,13 @@ fi # HIVE_HOME env variable overrides hive in the path HIVE_HOME=${HIVE_HOME:-$HIVE_DIR} +#if hive is not in path and not set by env, set it to default in build tree +if [ -n ${HIVE_HOME} ]; then + HIVE_HOME="${bin}/../.." +fi + if [ "$HIVE_HOME" == "" ]; then - echo "Cannot find hive installation: \$HIVE_HOME must be set or hive must be in the path"; + echo "${this}: Cannot find hive installation: \$HIVE_HOME must be set or hive must be in the path"; exit 4; fi @@ -87,13 +93,13 @@ fi HIVE_LIB_DIR=${HIVE_HOME}/lib if [ ! -d "$HIVE_LIB_DIR" ]; then - echo "Cannot find lib dir within HIVE_HOME : $HIVE_LIB_DIR"; + echo "${this}: Cannot find lib dir within HIVE_HOME : $HIVE_LIB_DIR"; exit 4; fi HIVE_CONF_DIR=${HIVE_CONF_DIR:-$HIVE_HOME/conf} if [ ! -d "$HIVE_CONF_DIR" ]; then - echo "Cannot find conf dir within HIVE_HOME : $HIVE_CONF_DIR"; + echo "${this}: Cannot find conf dir within HIVE_HOME : $HIVE_CONF_DIR"; exit 4; fi diff --git hcatalog/build-support/ant/test.xml hcatalog/build-support/ant/test.xml index 3489d12..c7edc9c 100644 --- hcatalog/build-support/ant/test.xml +++ hcatalog/build-support/ant/test.xml @@ -47,6 +47,9 @@ + + + diff --git hcatalog/build.xml hcatalog/build.xml index 516b462..a716385 100644 --- hcatalog/build.xml +++ hcatalog/build.xml @@ -28,6 +28,8 @@ +