From 3db39d3c759f0fbcc73f68fe832d90fd3f8f9821 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 12 Oct 2015 13:36:56 +0200 Subject: Also build snapshots of "maint-x.y" branches diff --git a/bin/build-snapshots b/bin/build-snapshots index 735aa16..63bfabc 100755 --- a/bin/build-snapshots +++ b/bin/build-snapshots @@ -21,7 +21,6 @@ prefix='/home/plugins' keep_days=2 snapshot_dir="$prefix/web/download/snapshot" repository="$prefix/repositories/monitoring-plugins.git" -branches=${*:-'master pu'} myself=${0##*/} make_dist() @@ -102,6 +101,14 @@ src_dir="$temp_dir/src" git clone --quiet --shared --no-checkout "$repository" "$src_dir" cd "$src_dir" +if [ $# -gt 0 ] +then + branches=$* +else + branches=$(git --git-dir="$repository" show-ref \ + | awk -F '/' '/refs\/heads\/(master|maint|pu)/ {print $NF}') +fi + for branch in $branches do git show-ref --verify "refs/remotes/origin/$branch" \ -- cgit v0.10-9-g596f