diff options
Diffstat (limited to 'bin/build-snapshot')
-rwxr-xr-x | bin/build-snapshot | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/build-snapshot b/bin/build-snapshot index 5633abd..e6b4082 100755 --- a/bin/build-snapshot +++ b/bin/build-snapshot | |||
@@ -38,8 +38,12 @@ create_snapshot() | |||
38 | branch=$1 | 38 | branch=$1 |
39 | snapshot_dir=$2 | 39 | snapshot_dir=$2 |
40 | 40 | ||
41 | git show-ref --verify --quiet "refs/heads/$branch" \ | 41 | if git show-ref --verify --quiet "refs/heads/$branch" |
42 | || git checkout --quiet --track "origin/$branch" | 42 | then |
43 | git checkout --quiet "$branch" | ||
44 | else | ||
45 | git checkout --quiet --track "origin/$branch" | ||
46 | fi | ||
43 | 47 | ||
44 | version=$(git describe --abbrev=4 'HEAD' | sed 's/release-//') | 48 | version=$(git describe --abbrev=4 'HEAD' | sed 's/release-//') |
45 | tarball="nagios-plugins-$version.tar.gz" | 49 | tarball="nagios-plugins-$version.tar.gz" |