#!/bin/bash -e proc gem_install { if ! gem list | grep -e "^$1 " { sudo gem install $i --no-ri --no-rdoc } } set -x gem_install foodcritic gem_install tailor setglobal TOP = $[git rev-parse --show-toplevel] if test ! -L "$TOP/.git/hooks/pre-commit" { ln -s ../../tests/pre-commit "$TOP/.git/hooks/pre-commit" }