Last active
February 10, 2016 16:33
-
-
Save maxkarelov/2864dbd4d934bcabe126 to your computer and use it in GitHub Desktop.
quick download artifact from nexus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NEXUS_URL=http://blabla:8080/nexus | |
GROUP=$1 | |
ARTIFACT=$2 | |
VERSION=$3 | |
PACKAGING=$4 | |
if [[ $# != 4 ]]; then | |
echo "Usage: $0 [GROUP_ID] [ARTIFACT_ID] [VERSION] [PACKAGING]" | |
exit 1 | |
fi | |
#curl --silent http://blabla/nexus/content/repositories/builds-all/ | sed -n 's/.*href="\([^"]*\).*/\1/p' | |
curl -f --silent -LO ${NEXUS_URL}/service/local/repositories/central/content/`echo "$GROUP" | tr '.' '/'`/${ARTIFACT}/${VERSION}/${ARTIFACT}-${VERSION}.${PACKAGING} | |
if [[ $? == 0 ]]; then | |
echo "OK" | |
exit 0 | |
fi | |
echo "NOT FOUND" | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment