--- /dev/null
+#!/bin/bash
+
+#* udpate-hooks-post-update.sh
+#* Updates and rebuilds another repo's hooks.
+#*
+
+VERBOSE=1
+TARGET_REPO="kraken-ui"
+HOOKS_REPO="${TARGET_REPO}-hooks"
+CHECKOUTS=~/checkouts
+REPOS=~/repositories
+
+
+# Utilities
+log () { [ "$VERBOSE" ] && echo -e "$*" >&2; }
+fail () { echo >&2; echo "Error: $*" >&2; exit 1; }
+
+count () { echo $#; }
+nth () { local n="$1"; shift; [ -z "$n" ] && return 1; [[ "$n" < 0 ]] && n=$(( 1 + $# + $n )); echo "${!n}"; }
+join () { local sep="$1" old="$IFS"; export IFS=\n; read -t1 out; while read -t1 line; do out="$out$sep$line"; done; echo "$out"; export IFS=$old; }
+
+
+
+
+log "Updating hooks repo (${HOOKS_REPO})...\n"
+{ cd $CHECKOUTS/$HOOKS_REPO &&
+ git fetch --all &&
+ git pull origin master
+} || fail "Problem running fetch & pull on ${HOOKS_REPO}.git!"
+
+log "\nCopying hooks into target repo (${TARGET_REPO})...\n"
+{ log "rsync ./hooks/ $REPOS/${TARGET_REPO}.git/hooks/" &&
+ rsync ./hooks/ $REPOS/${TARGET_REPO}.git/hooks/
+} || fail "Problem rsync-ing hooks to $REPOS/$TARGET_REPO.git/hooks!"
+
+log "\nok!"