add a script to generate the git snapshot.
This commit is contained in:
parent
4f646f3602
commit
c325fa4fd0
19
scripts/generate-git-snapshot.sh
Executable file
19
scripts/generate-git-snapshot.sh
Executable file
@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Set LINUX_GIT to point to an upstream Linux git tree in your .bashrc or wherever.
|
||||||
|
#
|
||||||
|
# TODO: Generate the gitN number.
|
||||||
|
#
|
||||||
|
|
||||||
|
VER=$(grep patch sources | head -n1 | awk '{ print $2 }' | sed s/patch-// | sed s/.xz//)
|
||||||
|
|
||||||
|
pushd $LINUX_GIT
|
||||||
|
|
||||||
|
git diff v$VER.. > /tmp/patch-$VER-git
|
||||||
|
xz -9 /tmp/patch-$VER-git
|
||||||
|
DESC=$(git describe)
|
||||||
|
popd
|
||||||
|
|
||||||
|
mv /tmp/patch-$VER-git.xz .
|
||||||
|
|
||||||
|
rpmdev-bumpspec -c "Linux $DESC" kernel.spec
|
Loading…
Reference in New Issue
Block a user