From feeaf5a3accc238313337ebf70dd6ba7f316ca0a Mon Sep 17 00:00:00 2001 From: John Ellson Date: Mon, 7 Oct 2013 17:52:32 -0400 Subject: [PATCH] prevent builder from overriding uncommited changes --- builder.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/builder.sh b/builder.sh index a0131c002..8f03ceccc 100755 --- a/builder.sh +++ b/builder.sh @@ -7,6 +7,16 @@ if ! test -d .git; then exit 1 fi +count=0 +git status -s | +while read rec; do + ((count += 1)) +done +if test $count -ne 0; then + echo "you have uncommitted changes in this directory, quitting" >&2 + exit 1 +fi + HOST=`hostname` # $HOME/.rpmmacros must match this -- 2.40.0