You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2015/10/08 21:43:30 UTC
incubator-tinkerpop git commit: attempt to make
validate-distribution.sh OSX friendly
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/tp30 d13c2d047 -> e1459d09f
attempt to make validate-distribution.sh OSX friendly
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/e1459d09
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/e1459d09
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/e1459d09
Branch: refs/heads/tp30
Commit: e1459d09f6496764d05f89f8b71301217ee1a047
Parents: d13c2d0
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Thu Oct 8 21:43:13 2015 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Thu Oct 8 21:43:13 2015 +0200
----------------------------------------------------------------------
bin/validate-distribution.sh | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e1459d09/bin/validate-distribution.sh
----------------------------------------------------------------------
diff --git a/bin/validate-distribution.sh b/bin/validate-distribution.sh
index 008b349..948257a 100755
--- a/bin/validate-distribution.sh
+++ b/bin/validate-distribution.sh
@@ -51,11 +51,15 @@ cd ${TMP_DIR}
# validate downloads
ZIP_FILENAME=`grep -o '[^/]*$' <<< ${URL}`
-DIR_NAME=`sed 's/-[^-]*$//' <<< ${ZIP_FILENAME}`
-COMPONENT=`tr '-' $'\n' <<< ${ZIP_FILENAME} | head -n3 | while read word ; do echo "${word^}" ; done | paste -sd ' '`
+DIR_NAME=`sed -e 's/-[^-]*$//' <<< ${ZIP_FILENAME}`
+COMPONENT=`tr '-' $'\n' <<< ${ZIP_FILENAME} | head -n3 | sed -e 's/^./\U&/' | paste -sd ' '`
echo -n "* downloading ${COMPONENT} ... "
-wget -q ${URL} ${URL}.asc ${URL}.md5 ${URL}.sha1 || (echo "Failed to download ${COMPONENT}" ; exit 1)
+curl -Ls ${URL} -o ${ZIP_FILENAME}
+for ext in "asc" "md5" "sha1"
+do
+ curl -Ls ${URL}.${ext} -o ${ZIP_FILENAME}.${ext} || (echo "Failed to download ${COMPONENT} (${ext})" ; exit 1)
+done
echo "OK"
# validate zip file
@@ -105,7 +109,7 @@ echo "OK"
echo -n "* validating ${COMPONENT}'s plugin directory ... "
[ -d "ext" ] || { echo "ext/ directory is not present"; exit 1; }
-if [ "${TYPE}" = "CONSOLE" ] || [[ `tr -d '.' <<< ${VERSION} | sed 's/-.*//'` -gt 301 ]]; then
+if [ "${TYPE}" = "CONSOLE" ] || [[ `tr -d '.' <<< ${VERSION} | sed -e 's/-.*//'` -gt 301 ]]; then
[ -d "ext/gremlin-groovy" ] && [ -d "ext/tinkergraph-gremlin" ] && [ -s "ext/plugins.txt" ] || { echo "ext/ directory is not present or incomplete"; exit 1; }
fi
echo "OK"
@@ -116,6 +120,6 @@ echo "OK"
if [ "${TYPE}" = "CONSOLE" ]; then
echo -n "* testing script evaluation ... "
- [[ `bin/gremlin.sh <<< 'TinkerFactory.createModern().traversal().V().count()' | grep '^==>' | sed 's/^==>//'` -eq 6 ]] || { echo "failed to evaluate sample script"; exit 1; }
+ [[ `bin/gremlin.sh <<< 'TinkerFactory.createModern().traversal().V().count()' | grep '^==>' | sed -e 's/^==>//'` -eq 6 ]] || { echo "failed to evaluate sample script"; exit 1; }
echo "OK"
fi