#!/bin/bash # # (c) 2014-2016 - Bertrand Jacquin # # Called by git-commit with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # # To enable this hook, run: # cd $(git rev-parse --show-toplevel) # ln -s ../../scripts/hook-metadata .git/hooks/pre-commit ROOT="$(git rev-parse --show-toplevel)" REPO="$(< ${ROOT}/profiles/repo_name)" if [[ "${REPO}" != "pants-on" ]] ; then exit 0 fi egencache --repo="${REPO}" \ --update \ --update-use-local-desc git add -vA "${ROOT}/profiles/use.local.desc"