summaryrefslogtreecommitdiffstats
path: root/bin/mkpkgdata
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2012-01-17 17:30:28 +0100
committerJustin Davis <jrcd83@gmail.com>2012-01-17 17:38:36 +0100
commit6a64f1e970411510c51165da83fdece602649f1c (patch)
tree581170a31465e45e5a5fba8ad528169fa8c9da3e /bin/mkpkgdata
parentdf7d6667e5c016faacde7fb78d232016d5f39339 (diff)
downloadgenpkg-6a64f1e970411510c51165da83fdece602649f1c.tar.gz
genpkg-6a64f1e970411510c51165da83fdece602649f1c.tar.xz
Better error check/report in genpkg and perl-dist.
metas/perl was not returning the right error. metas/perl.d/perl-dist now reports a better error when ~/.genpkg/var/corelist is missing. genpkg was also not examining the right error code.
Diffstat (limited to 'bin/mkpkgdata')
-rwxr-xr-xbin/mkpkgdata14
1 files changed, 6 insertions, 8 deletions
diff --git a/bin/mkpkgdata b/bin/mkpkgdata
index ced31db..f330894 100755
--- a/bin/mkpkgdata
+++ b/bin/mkpkgdata
@@ -60,20 +60,18 @@ tmp="/tmp/$prog.$$"
for flav in "$METABIN"/*
do
[ -f "$flav" -a -x "$flav" ] || continue
- PATH="$PATH:$flav.d" "$flav" "$1" > "$tmp"
trap 'rm "$tmp"' 1 2 15
+ PATH="$PATH:$flav.d" "$flav" "$1" > "$tmp"
metaret=$?
- if [ "$metaret" -eq 0 ]
- then
- basicmeta "$1"
+ case "$metaret" in
+ 0) basicmeta "$1"
lazysource < "$tmp"
- rm "$tmp"
- exit 0
- fi
+ esac
rm "$tmp"
trap '' 1 2 5
- case $metaret in
+ case "$metaret" in
+ 0) exit 0 ;;
1) echo "$prog: $flav encountered an error" 1>&2
exit 1 ;;
2) ;; # loop