Skip to content

@rafeco /projtags.sh
Last active

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Generate tags files for all of the non-hidden directories under the current directory.
#!/bin/sh
start=$(pwd)
for f in $(find . \( ! -regex '.*/\..*' \) -type d); do
cd $f
ctags *
cd $start
done
ctags --file-scope=no -R
#!/bin/bash
start=$(pwd)
# Generate tags files in directories where "tags" is not the newest file
for f in $(find . -type f -newer ./tags); do
cd $f
ctags *
cd $start
done
# Generate tags files in directories with no tags files where the parent
# directory does have a tags file. Ignore hidden directories.
for f in $(find . -type d \( ! -regex '.*/\..*' \) \! -exec test -e '{}/tags' \; -print); do
if [ -e ${f}/../tags ]; then
cd $f
ctags *
cd $start
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.