diff options
author | Lars Wirzenius <liw@liw.fi> | 2012-10-28 12:12:28 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2012-10-28 12:12:28 +0000 |
commit | 5c34b3ba7993b7c7747a5b49d1009be8d50bc4ac (patch) | |
tree | ffdab344c13d58158df8aed25dcc69b551bcda29 | |
parent | 4d1e53f92a9b80824b903e46a0744a01a3179872 (diff) | |
download | jenkinstool-5c34b3ba7993b7c7747a5b49d1009be8d50bc4ac.tar.gz |
Add script to fetch Debian artifacts
-rwxr-xr-x | fetch | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -0,0 +1,35 @@ +#!/bin/sh + +set -eu + +package="$1" +version="$2" + +repourl="http://192.168.122.113/jenkins/debian" + +case "$package" in + lib?*) + subdir=$(echo "$package" | cut -c1-4) + ;; + *) + subdir=$(echo "$package" | cut -c1) + ;; +esac + +baseurl="$repourl/pool/main/$subdir/$package/${package}_$version" + +for url in \ + "${baseurl}_source.changes" \ + "${baseurl}_all.changes" \ + "${baseurl}_i386.changes" \ + "${baseurl}_amd64.changes" \ + "${baseurl}.squeeze_source.changes" \ + "${baseurl}.squeeze_all.changes" \ + "${baseurl}.squeeze_i386.changes" \ + "${baseurl}.squeeze_amd64.changes" +do + if curl -s --head --fail "$url" | head -n1 | grep -q '^HTTP/1.1 200' + then + dget -q -d -u "$url" + fi +done |