#!/bin/bash
#
# An example hook script to store metadata information using
# metastore on each commit.

if ! metastore -s; then
	echo "Failed to execute metastore -s" >&2
	exit 1
fi

if [ ! -e ".metadata" ]; then
	echo ".metadata missing" >&2
	exit 1
fi

if ! git-add .metadata; then
	echo "Failed to execute git-add .metadata" >&2
	exit 1
fi

exit 0