repo.or.cz
/
metastore.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
metaentry.c: Use realpath() instead of GNU-ish canonicalize_file_name().
[metastore.git]
/
examples
/
post-checkout
blob
bd4de154bad7d2e7e58dc745c86c34a6efae511c
1
#!/bin/sh
2
#
3
# An example hook script to set metadata information using
4
# metastore after each checkout.
5
6
MSFILE
=
".metadata"
7
8
exit_on_fail
() {
9
"$@"
10
if
[
$?
-ne
0
];
then
11
echo
"Failed to execute: $@"
>&
2
12
exit
1
13
fi
14
}
15
16
if
[ !
-e
"
$MSFILE
"
];
then
17
echo
"
\"
$MSFILE
\"
missing"
>&
2
18
exit
1
19
fi
20
21
exit_on_fail \
22
metastore
-a -m -e -E -q -f
"
$MSFILE
"
23
24
exit
0