All pastes #927377 Raw Edit

clueless

public text v1 · immutable
·published 2008-03-04 07:16 UTC
rendered paste body
#!/bin/bash## An example hook script to store metadata information using# metastore on each commit. A verification message with a list# of changes will first be shown and only if it is accepted will# the commit proceed.echo "Going to commit the following metadata changes" >&2metastore -c -m >&2echo -n "Ok to commit? (y/n): " >&2read -n1 REPLYecho ""if [ "$REPLY" != "y" ]; then	echo "Aborted" >&2	exit 1fiif ! metastore -s; then	echo "Failed to execute metastore -s" >&2	exit 1fiif [ ! -e ".metadata" ]; then	echo ".metadata missing" >&2	exit 1fiif ! git-add .metadata; then	echo "Failed to execute git-add .metadata" >&2	exit 1fiexit 0