| 1 | #! /bin/sh |
| 2 | |
| 3 | # Default: index infernal, hmmer, easel. Need `find -L` to |
| 4 | # follow symlinks to hmmer and easel. |
| 5 | # |
| 6 | # Options: |
| 7 | # -x: only index infernal; not hmmer or easel. |
| 8 | # |
| 9 | # The -x option is used when the higher-level ~/src/makeTAGS.sh calls |
| 10 | # us, indexing entire stack of lab code (easel, hmmer3, hmmer4, |
| 11 | # infernal) without redundancy. |
| 12 | # |
| 13 | |
| 14 | while [[ "$#" -gt 0 ]]; do case $1 in |
| 15 | -x) optx=1;; |
| 16 | *) echo "Unknown option: $1"; exit 1;; |
| 17 | esac; shift; done |
| 18 | |
| 19 | if [ $optx ]; then |
| 20 | opt="" |
| 21 | excl=" -path ./easel -prune -or -path ./hmmer -prune -or" |
| 22 | else |
| 23 | opt="-L" |
| 24 | excl="" |
| 25 | fi |
| 26 | |
| 27 | |
| 28 | etags configure.ac |
| 29 | etags -a INSTALL |
| 30 | etags -a LICENSE |
| 31 | |
| 32 | find $opt . $excl -name "*.c" -print -or -name "*.h" -print | xargs etags -a |
| 33 | find $opt . $excl -name "*.pl" -print -or -name "*.pm" -print | xargs etags -a |
| 34 | find $opt . $excl -name "*.py" -print | xargs etags -a |
| 35 | find $opt . $excl -name "*.sh" -print | xargs etags -a |
| 36 | find $opt . $excl -name "*.md" -print | xargs etags -a |
| 37 | find $opt . $excl -name "*.tex" -print | xargs etags -a |
| 38 | find $opt . $excl -name "*.man" -print | xargs etags -a |
| 39 | find $opt . $excl -name "*.in" -print | xargs etags -a |
| 40 | find $opt . $excl -name "*.sqc" -print | xargs etags -a |
| 41 | find $opt . $excl -name "*README" -print | xargs etags -a |