diff --git a/ci/images/test-build b/ci/images/test-build index 330e75ae..a8e4951c 100755 --- a/ci/images/test-build +++ b/ci/images/test-build @@ -1,15 +1,22 @@ #!/bin/sh # usage: $0 [branch name] [configure parameters] -urlbase="https://github.com/kdave/btrfs-progs/archive/" +urlbase="https://github.com/kdave/btrfs-progs/archive" branch=${1:-devel} -url=${urlbase}${branch}.tar.gz +fname=${branch}.tar.gz +url="${urlbase}/${fname}" shift echo "btrfs-progs build test of branch ${branch}" cd /tmp -wget "$url" -O ${branch}.tar.gz -tar xf ${branch}.tar.gz -cd btrfs-progs-${branch} +if [ -f "$fname" -a -s "$fname" ]; then + echo "Found local file $fname, not downloading" +else + echo "Missing or empty tar, downloading devel branch from git" + rm -- "$fname" + wget "$url" -O "$fname" +fi +tar xf "$fname" +cd btrfs-progs-$branch ci/build-default "$@"