From 2358aeacb0e67deff3647c84e1a86f2562d3cd33 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 5 May 2014 17:23:23 +0200 Subject: [PATCH] contrib/makerepo: add default gitignore pattern to makerepo.gitignore Signed-off-by: Thomas Haller --- contrib/fedora/utils/makerepo.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/fedora/utils/makerepo.sh b/contrib/fedora/utils/makerepo.sh index 734c65b0d5..8cb75a82ff 100755 --- a/contrib/fedora/utils/makerepo.sh +++ b/contrib/fedora/utils/makerepo.sh @@ -116,6 +116,11 @@ if [[ -f ./.git/makerepo.gitignore ]]; then /bin/cp ./.git/makerepo.gitignore ./ fi +DEFAULT_BACKUP_PATTERN='*.[0-9][0-9][0-9][0-9][-.]*.orig' +if ! grep -q -e "$DEFAULT_BACKUP_PATTERN" "./makerepo.gitignore" ; then + echo "$DEFAULT_BACKUP_PATTERN" >> ./makerepo.gitignore +fi + pushd "$DIRNAME" git init . # if you have a local clone of upstream, symlink it as ../.git/local.