From 5fda1eb42cbb985db5482c64e34029746fba8ffb Mon Sep 17 00:00:00 2001 From: Kyle McMartin Date: Thu, 18 Jul 2013 20:10:36 -0400 Subject: [PATCH] generate-git-snapshot.sh: warn if $LINUX_GIT dir is unset --- scripts/generate-git-snapshot.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/generate-git-snapshot.sh b/scripts/generate-git-snapshot.sh index 239b846c9..b6fe0d6c1 100755 --- a/scripts/generate-git-snapshot.sh +++ b/scripts/generate-git-snapshot.sh @@ -2,6 +2,8 @@ # # Set LINUX_GIT to point to an upstream Linux git tree in your .bashrc or wherever. +[ ! -d "$LINUX_GIT" ] && echo "error: set \$LINUX_GIT to point at upstream git tree" && exit 1 + VER=$(grep patch sources | head -n1 | awk '{ print $2 }' | sed s/patch-// | sed s/-git.*// | sed s/.xz//) OLDGIT=$(grep gitrev kernel.spec | head -n1 | sed s/%define\ gitrev\ //)