Skip to content

Commit

Permalink
- Updated script list-all to get all available versions of Groovy
Browse files Browse the repository at this point in the history
- Updated script install to download and install all the versions correctly
  • Loading branch information
weibemoura committed Sep 19, 2018
1 parent 471d7fa commit 950838c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
15 changes: 11 additions & 4 deletions bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,16 @@ then
else
mkdir -p "$ASDF_INSTALL_PATH"
cd "$ASDF_INSTALL_PATH" || exit 1
VERSION=$(echo $ASDF_INSTALL_VERSION | awk -F- '{print "apache-"$1"-binary-"$2}')
curl -OJL https://dl.bintray.com/groovy/maven/${VERSION}.zip
unzip ${VERSION}.zip
rm ${VERSION}.zip

rm -rf ${ASDF_INSTALL_VERSION}*

curl -OJL https://dl.bintray.com/groovy/maven/${ASDF_INSTALL_VERSION}.zip
unzip ${ASDF_INSTALL_VERSION}.zip -d ${ASDF_INSTALL_VERSION}
rm ${ASDF_INSTALL_VERSION}.zip

mv ${ASDF_INSTALL_VERSION}/*/* ${ASDF_INSTALL_VERSION}/
VERSION=$(echo ${ASDF_INSTALL_VERSION} | awk -F- '{print $NF}')
rm -rf ${ASDF_INSTALL_VERSION}/*${VERSION}

mv ${ASDF_INSTALL_VERSION}/* .
fi
3 changes: 1 addition & 2 deletions bin/list-all
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
#!/bin/sh
#curl -s https://dl.bintray.com/groovy/maven/ | grep -e "apache-groovy-binary.*.zip\"" | sed -e "s#^.*:##" -e "s#.zip.*##" | sort -t. -n | paste -s -d" " -
curl -s https://dl.bintray.com/groovy/maven/ | grep -e "apache-groovy-binary.*.zip\"" | sed -e "s#^.*:apache-##" -e "s#binary-##" -e "s#.zip.*##" | sort -t. -n | paste -s -d" " -
curl -s https://dl.bintray.com/groovy/maven/ | grep -e ".*-binary.*.zip\"" | sed -e "s#^.*:##" -e "s#.zip.*##" | sort -t. -n | paste -s -d" " -

0 comments on commit 950838c

Please sign in to comment.