#!/usr/bin/env bash # # script to generate tags automatically if there are none. # set -euo pipefail files="$*" vimtags=${CODEROOT:?}/tags emacstags=${CODEROOT:?}/TAGS # if [[ ! -r $emacstags ]]; then echo Generating emacs TAGS from scratch... fast-tags -e -R "${CODEROOT:?}" ctags -e \ --append=yes \ --recurse=yes \ --exclude="$CODEROOT/_/*" \ "${CODEROOT:?}" else fast-tags -e "$files" ctags -e \ --append=yes \ --exclude="_/*" \ "$files" fi # if [[ ! -r $vimtags ]]; then echo Generating vim tags from scratch... fast-tags -R "${CODEROOT:?}" ctags \ --append=yes \ --recurse=yes \ --exclude="${CODEROOT:?}/_/*" \ "${CODEROOT:?}" else fast-tags "$files" ctags \ --append=yes \ --exclude="_/*" \ "$files" fi ##