Instantly share code, notes, and snippets.

View nxfetch.sh
#!/bin/bash
# Argument = -h -v -i groupId:artifactId:version -c classifier -p packaging -r repository
#shopt -o -s xtrace
# Define Nexus Configuration
NEXUS_BASE=http://repository.example.com:8081/nexus
REST_PATH=/service/local
ART_REDIR=/artifact/maven/redirect
View nxfetch.sh
#!/bin/bash -e
# Argument = -h -v -i groupId:artifactId:version -c classifier -p packaging
#shopt -o -s xtrace
# Define Nexus Configuration
NEXUS_BASE=http://repository.example.com:8081/nexus #this URL shouldn't end in a /
REST_PATH=/service/local
ART_REDIR=/artifact/maven/redirect
View length as stack top
:start
duplicate
not
goto done
push 1
add
duplicate
push 2
subtract
push 3 -1