From a69a41b117eca2c76262c8ab5a694040a91fbe8e Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Sun, 6 Jan 2008 01:57:17 +0100 Subject: [PATCH] Created the dcp-recent script. --- dcp-recent | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 dcp-recent diff --git a/dcp-recent b/dcp-recent new file mode 100755 index 0000000..951ce25 --- /dev/null +++ b/dcp-recent @@ -0,0 +1,36 @@ +#!/bin/sh + +set -e + +usage() { + echo "usage: dcp-recent REPODIR" +} + +rungit() { + ( + cd "$repodir" + git "$@" + ) || false +} + +if [ $# -lt 1 ]; then + usage >&2 + exit 1 +fi + +repodir="$1" +shift + +if [ ! -d "$repodir" ]; then + echo "dcp-recent: cannot find $repodir" >&2 + exit 1 +fi + +if ! rungit tag -l | grep -q ^lastbuild$; then + exit 1 +fi + +lastbuild="$(rungit rev-parse lastbuild)" +master="$(rungit rev-parse master)" + +[ "$master" = "$lastbuild" ] -- 2.11.0