summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/rawhide-snapshot.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/scripts/rawhide-snapshot.sh b/scripts/rawhide-snapshot.sh
index ac9bfc771..b96bd38d9 100755
--- a/scripts/rawhide-snapshot.sh
+++ b/scripts/rawhide-snapshot.sh
@@ -23,13 +23,24 @@ if [ ! -d "$LINUX_GIT" ]; then
exit 1
fi
-pushd $LINUX_GIT
-git pull
+git -C $LINUX_GIT pull
if [ ! $? -eq 0 ]; then
echo "Git pull failed. Is your tree clean/correct?"
exit 1
fi
-popd
+
+git -C $LINUX_GIT describe --tags HEAD | grep -q "\-g"
+if [ ! $? -eq 0 ]; then
+ echo "Trying to snapshot off of a tagged git."
+ echo "I don't think this is what you want"
+ exit 1
+fi
+
+if [ "$(git -C $LINUX_GIT rev-parse origin/master)" == `cat gitrev` ]; then
+ echo "Last snapshot commit matches current master. Nothing to do"
+ echo "\o/"
+ exit 0
+fi
GIT=`grep "%define gitrev" kernel.spec | cut -d ' ' -f 3`
if [ "$GIT" -eq 0 ]; then