blob: 9c0a6c51e7b3f91917694756c1647dbf598e94d0 (
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
|
#!/bin/sh
case $# in
0) echo "Usage: makepkgmeta [pkgname]" 1>&2
exit 1
esac
case "$METABIN" in
'') echo "makepkgmeta: set METABIN before calling makepkgmeta" 1>&2
exit 2
esac
printf "pkgname\n%s\n\n" "$1"
printf "pkgrel\n%d\n\n" "${PKGREL:-1}"
printf "packager\n%s\n\n" "${PACKAGER:-Anonymous}"
if [ "$MAINTAINER" ]
then
printf "maintainer\n%s\n\n" "$MAINTAINER"
fi
for flav in "$METABIN"/*
do
[ -x "$flav" ] || continue
PATH="$PATH:$flav.d" "$flav" $1
metaret=$?
case $metaret in
0) exit 0 ;;
1) ;;
2) echo "error: $flav encountered an error"; exit 2 ;;
*) echo "error: $flav returned error code $metaret"; exit 2 ;;
esac
done
echo "error: no matching meta generator found for '$1'" 1>&2
exit 1
|