diff --git a/scripts/generate-git-snapshot.sh b/scripts/generate-git-snapshot.sh index b6fe0d6c1..ec0d702ef 100755 --- a/scripts/generate-git-snapshot.sh +++ b/scripts/generate-git-snapshot.sh @@ -6,6 +6,11 @@ VER=$(grep patch sources | head -n1 | awk '{ print $2 }' | sed s/patch-// | sed s/-git.*// | sed s/.xz//) +if [ -z "$VER" ] ; +then + VER=$(grep linux sources | head -1 | awk '{ print $2 }' | sed s/linux-// | sed s/.tar.xz//) +fi + OLDGIT=$(grep gitrev kernel.spec | head -n1 | sed s/%define\ gitrev\ //) export NEWGIT=$(($OLDGIT+1))