Skip to content

Commit

Permalink
Fix sorting of ignore files
Browse files Browse the repository at this point in the history
We haven't been using CVS since ... 2009-05-04 :-|
  • Loading branch information
paddy-hack committed Jun 26, 2016
1 parent 0bc7b6a commit b25ef62
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
12 changes: 9 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,17 @@ EXTRA_DIST = ChangeLog-1.0.0 ChangeLog-1.0.1 ChangeLog-1.0.2 \
$(PACKAGE).lsm

#
# Keep the .cvsignore files sorted, and use this target to do it.
# Keep the .gitignore files sorted, and use this target to do it.
# Note that git's negated ignore patterns introduce order dependency
# and should therefor be sorted with much more care than we do here.
# Until that has been taken care of, such files are best left alone.
#
PERL=perl
sort-cvsignore:
for f in `find . -name .cvsignore`; do \
sort-gitignore:
for f in `find . -name .gitignore`; do \
if test -n "`sed -n '/^\!/p' $$f`"; then \
echo "$$f: skipping file with negated pattern" >&2; \
fi; \
$(PERL) -e 'print sort <>;' < $$f > $$f.tmptmp; \
mv $$f.tmptmp $$f; \
done
Expand Down
12 changes: 9 additions & 3 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,10 @@ EXTRA_DIST = ChangeLog-1.0.0 ChangeLog-1.0.1 ChangeLog-1.0.2 \


#
# Keep the .cvsignore files sorted, and use this target to do it.
# Keep the .gitignore files sorted, and use this target to do it.
# Note that git's negated ignore patterns introduce order dependency
# and should therefor be sorted with much more care than we do here.
# Until that has been taken care of, such files are best left alone.
#
PERL = perl
ACLOCAL_AMFLAGS = -I m4
Expand Down Expand Up @@ -947,8 +950,11 @@ uninstall-am: uninstall-dist_docDATA
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
tags tags-am uninstall uninstall-am uninstall-dist_docDATA

sort-cvsignore:
for f in `find . -name .cvsignore`; do \
sort-gitignore:
for f in `find . -name .gitignore`; do \
if test -n "`sed -n '/^\!/p' $$f`"; then \
echo "$$f: skipping file with negated pattern" >&2; \
fi; \
$(PERL) -e 'print sort <>;' < $$f > $$f.tmptmp; \
mv $$f.tmptmp $$f; \
done
Expand Down

0 comments on commit b25ef62

Please sign in to comment.