blob: 6c7db2faccf72290ddc1abad8d9413f3c6723ebd (
plain)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
#!/hint/bash
alpine_keys=(
'NICKNAME'
'FN'
'EMAIL'
'FCC'
'COMMENT'
)
keys=(
'UID'
"${alpine_keys[@]}"
'REV'
)
find_vcs() {
{
find "${git_dir}" \
-name '.git' \
-prune \
, \
-type f \
-name '*.vcs' \
-printf '%p\n'
git -C "${git_dir}" archive HEAD \
| tar -t \
| sed '
/\.vcs$/!d
s@^@'"${git_dir%/}"'/@
'
} \
| sort -u
}
git_dir="$1"
if [ ! -d "${git_dir}" ]; then
>&2 printf 'invalid git dir: "%s"\n' "${git_dir}"
exit 1
fi
|