Skip to content

Instantly share code, notes, and snippets.

@dougcole
dougcole / run_tags.rb
Created June 29, 2011 18:40 — forked from tobias/run_tags.rb
A script for generating TAGS from a git hook.
#!/usr/bin/ruby
#-*-ruby-*-
# A script to run ctags on all .rb files in a project. Can be run on
# the current dir, called from a git callback, or install itself as a
# git post-merge and post-commit callback.
CTAGS = '/usr/local/bin/ctags'
HOOKS = %w{ post-merge post-commit post-checkout }
HOOKS_DIR = '.git/hooks'