diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-30 20:50:18 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-30 20:50:18 +0100 |
commit | 3b3c80db30af556d5da7301037bf16782216d0bd (patch) | |
tree | 8d4c5dac1a73e9a5bd0af4923982bc84566ffd24 /libexec/app-resolver-maven | |
parent | a4215743db91c4b7050dfda32a670814a101b773 (diff) | |
download | app.sh-3b3c80db30af556d5da7301037bf16782216d0bd.tar.gz app.sh-3b3c80db30af556d5da7301037bf16782216d0bd.tar.bz2 app.sh-3b3c80db30af556d5da7301037bf16782216d0bd.tar.xz app.sh-3b3c80db30af556d5da7301037bf16782216d0bd.zip |
bin/app-init:
o Adding -p to mkdir so parent directories are created.
libexec/app-resolver-maven:
o Not using command expansion to make sure "set -e" works as normal.
o Adding a basic check that xmlstartlet has a useful output.
Diffstat (limited to 'libexec/app-resolver-maven')
-rwxr-xr-x | libexec/app-resolver-maven | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libexec/app-resolver-maven b/libexec/app-resolver-maven index a347abb..a3b367c 100755 --- a/libexec/app-resolver-maven +++ b/libexec/app-resolver-maven @@ -124,8 +124,14 @@ resolve_snapshot() { local r=$repo/$base_path/maven-metadata.xml get $r $l -# x=`xmlstarlet sel -t -m '//snapshotVersion[extension[text()="zip"]]' -v value $l` - set -- `xmlstarlet sel -t -m '/metadata/versioning/snapshot' -v "timestamp|buildNumber" $l` + x=$(xmlstarlet sel -t -m '/metadata/versioning/snapshot' -v "timestamp|buildNumber" $l) + set -- $x + + if [[ $# != 2 ]] + then + fatal "Unable extract a useful timestamp from maven-metadata.xml." + fi + snapshot_version="$1-$2" if [[ $snapshot_version == "" ]] |