contrib/makerepo: use the patch backup extentions from specfile for gitignore

Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
Thomas Haller 2014-06-17 20:01:03 +02:00
parent fa980d800b
commit 0f75272136

View file

@ -237,7 +237,11 @@ EOF
git commit -m '*** add all'
[[ x == "x$(git diff HEAD "$ORIG_HEAD")" ]] || die "error recreating initial tarball"
fi
cat ../makerepo.gitignore > .gitignore
(
cat ../makerepo.gitignore;
sed -n 's/^%patch\([0-9]\+\) \+.*-b \+\([^ ]\+\).*$/*\2/p' ../"$SPEC";
) | LANG=C sort | LANG=C uniq > .gitignore
git rm --cached -r .
git add --all .
git commit -m "*** clean state (ignored files removed)"