diff options
Diffstat (limited to 'bin/build-snapshots')
| -rwxr-xr-x | bin/build-snapshots | 9 |
1 files changed, 8 insertions, 1 deletions
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' | |||
| 21 | keep_days=2 | 21 | keep_days=2 |
| 22 | snapshot_dir="$prefix/web/download/snapshot" | 22 | snapshot_dir="$prefix/web/download/snapshot" |
| 23 | repository="$prefix/repositories/monitoring-plugins.git" | 23 | repository="$prefix/repositories/monitoring-plugins.git" |
| 24 | branches=${*:-'master pu'} | ||
| 25 | myself=${0##*/} | 24 | myself=${0##*/} |
| 26 | 25 | ||
| 27 | make_dist() | 26 | make_dist() |
| @@ -102,6 +101,14 @@ src_dir="$temp_dir/src" | |||
| 102 | git clone --quiet --shared --no-checkout "$repository" "$src_dir" | 101 | git clone --quiet --shared --no-checkout "$repository" "$src_dir" |
| 103 | cd "$src_dir" | 102 | cd "$src_dir" |
| 104 | 103 | ||
| 104 | if [ $# -gt 0 ] | ||
| 105 | then | ||
| 106 | branches=$* | ||
| 107 | else | ||
| 108 | branches=$(git --git-dir="$repository" show-ref \ | ||
| 109 | | awk -F '/' '/refs\/heads\/(master|maint|pu)/ {print $NF}') | ||
| 110 | fi | ||
| 111 | |||
| 105 | for branch in $branches | 112 | for branch in $branches |
| 106 | do | 113 | do |
| 107 | git show-ref --verify "refs/remotes/origin/$branch" \ | 114 | git show-ref --verify "refs/remotes/origin/$branch" \ |
