From 0f75272136c799c2515c5a459fe378021482cfeb Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Tue, 17 Jun 2014 20:01:03 +0200 Subject: [PATCH] contrib/makerepo: use the patch backup extentions from specfile for gitignore Signed-off-by: Thomas Haller --- contrib/fedora/utils/makerepo.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/contrib/fedora/utils/makerepo.sh b/contrib/fedora/utils/makerepo.sh index 3d2f36bea3..a1e1166878 100755 --- a/contrib/fedora/utils/makerepo.sh +++ b/contrib/fedora/utils/makerepo.sh @@ -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)"