blob: c38c9c1a1c96e2f21fc88daa7e2aa8138d3abbed (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/bash
#
# (c) 2014-2015 - Bertrand Jacquin <bertrand@jacquin.bzh>
#
# 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}" == "gentoo" ]] ; then
exit 0
fi
egencache --repo="${REPO}" \
--update \
--update-use-local-desc
git add -vA "${ROOT}/profiles/use.local.desc"
git add -vA "${ROOT}/metadata/md5-cache"
|