I have a find command that I would like to sort such that entries for certain directories are sorted last. The reason is that this list is to be passed to etags to create a tags table and I would like certain third-party tool directories to be after all the code I actively edit.
Can someone suggest a good easy way in to sort the list as a change to my makefile rule? Here is the current rule:
tags:
rm -f ../TAGS
find .. \( -not -regex '.*include/.*' \) \
-a \( -name '*.h' -o -name '*.hh' -o -name '*.y' \
-o -name '*.l' -o -name '*.cc' -o -name '*.cpp' \
-o -name '*.c' -o -name '*.inl' \) \
| xargs etags -o ../TAGS --append
For example, entries that begin "../flexlm/" or "../src/librsync" should come after entries that don't match one of these patterns.