summaryrefslogtreecommitdiffstats
path: root/scripts/generate-git-snapshot.sh
diff options
context:
space:
mode:
authorJosh Boyer <jwboyer@fedoraproject.org>2015-09-01 10:14:49 -0400
committerJosh Boyer <jwboyer@fedoraproject.org>2015-09-01 10:14:49 -0400
commit3c964af1ebd4ca84c116300884b417f8c75b7b8a (patch)
tree9fb60503dac5d416f5f4383675a3e7add4a33844 /scripts/generate-git-snapshot.sh
parent0ee200eaae7874268ac0fa8a1c5fea5f2315985f (diff)
downloadkernel-3c964af1ebd4ca84c116300884b417f8c75b7b8a.tar.gz
kernel-3c964af1ebd4ca84c116300884b417f8c75b7b8a.tar.xz
kernel-3c964af1ebd4ca84c116300884b417f8c75b7b8a.zip
Make the git snapshot generator work for -git1 patches
Before it would just error out because it was only looking at the patch- listings in the sources file. So now we let it do that, and if the VER variable is null after we just assume it's the first git snapshot of the merge window and figure out the version from the linux- tarball. Why I didn't fix this sooner, I have no idea. Probably because it only happens 4 times a year and laziness wins the day.
Diffstat (limited to 'scripts/generate-git-snapshot.sh')
-rwxr-xr-xscripts/generate-git-snapshot.sh5
1 files changed, 5 insertions, 0 deletions
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))