SQOOP-771: Sqoop2: Improve addtowar.sh (Cheolsoo Park 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/2f470890 Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/2f470890 Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/2f470890 Branch: refs/heads/branch-1.99.1 Commit: 2f4708902a5d3ca6fff68f798247112566818e7c Parents: 0b02bb4 Author: Jarek Jarcec Cecho <[email protected]> Authored: Fri Dec 14 13:40:00 2012 -0800 Committer: Jarek Jarcec Cecho <[email protected]> Committed: Sat Dec 15 23:08:31 2012 -0800 ---------------------------------------------------------------------- dist/src/main/bin/addtowar.sh | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/sqoop/blob/2f470890/dist/src/main/bin/addtowar.sh ---------------------------------------------------------------------- diff --git a/dist/src/main/bin/addtowar.sh b/dist/src/main/bin/addtowar.sh index b5ffc0e..27916ee 100644 --- a/dist/src/main/bin/addtowar.sh +++ b/dist/src/main/bin/addtowar.sh @@ -71,7 +71,7 @@ function checkFileDoesNotExist() { # Finds a file under a directory any depth, file returns in variable RET function findFile() { - RET=`find -H ${1//:/$' '} -name ${2} | grep -e "[0-9.a${hadoopJarsSuffix}].jar"` + RET=`find -H ${1//:/$' '} -name ${2}` RET=`echo ${RET} | sed "s/ .*//"` if [ "${RET}" = "" ]; then echo @@ -136,7 +136,7 @@ function guessHadoopHome() { function getHadoopJars() { version=$1 # List is separated by ":" - suffix="-[0-9.]*" + suffix="[0-9a-zA-Z\.\-]*" if [[ "${version}" =~ cdh4mr1 ]]; then hadoopJars="hadoop-mapreduce-client-core${suffix}.jar:hadoop-mapreduce-client-common${suffix}.jar:hadoop-mapreduce-client-jobclient${suffix}.jar:hadoop-mapreduce-client-app${suffix}.jar:hadoop-yarn-common${suffix}.jar:hadoop-yarn-api${suffix}.jar:hadoop-hdfs${suffix}.jar:hadoop-common${suffix}.jar:hadoop-auth${suffix}.jar:guava*.jar:protobuf-java${suffix}.jar:jackson-core-asl${suffix}.jar:jackson-mapper-asl${suffix}.jar:commons-configuration${suffix}.jar:commons-cli${suffix}.jar:commons-logging${suffix}.jar:slf4j-api${suffix}.jar:slf4j-log4j12${suffix}.jar:avro${suffix}.jar:hadoop-core-2.0.0-mr1-[0-9.A-Za-z]*.jar" elif [[ "${version}" =~ cdh3 ]]; then
