diff options
author | Justin Davis <jrcd83@gmail.com> | 2011-11-20 17:56:08 +0100 |
---|---|---|
committer | Justin Davis <jrcd83@gmail.com> | 2011-11-20 17:56:08 +0100 |
commit | 56b249308eba7e641fb84c45b08b290133e1d783 (patch) | |
tree | fab4e236cf0feec16c0d95514665cbdaeb51faef /bin | |
parent | a36fce5c41553ae705d265813560a0823b9b6249 (diff) | |
download | genpkg-56b249308eba7e641fb84c45b08b290133e1d783.tar.gz genpkg-56b249308eba7e641fb84c45b08b290133e1d783.tar.xz |
More fine-tuning of errors and messages.
Cleanup package dirs when meta building fails, in genpkg.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/genpkg | 8 | ||||
-rwxr-xr-x | bin/makepkgmeta | 4 |
2 files changed, 9 insertions, 3 deletions
@@ -32,7 +32,6 @@ then fi cwd=$(pwd) -set -e for pkg do @@ -40,7 +39,12 @@ do cd "$pkgd/$pkg" METABIN=$libd/metas PKGVAR=$vard makepkgmeta "$pkg" >PKGMETA - case $? in 1) rm PKGMETA ; exit 1 ;; esac + case $? in + 1) cd .. + rm -r "$pkgd/$pkg" + echo "$prog: aborting." 1>&2 + exit 1 + esac echo "Generated $pkgd/$pkg/PKGMETA" diff --git a/bin/makepkgmeta b/bin/makepkgmeta index b6dfcff..82a7b1f 100755 --- a/bin/makepkgmeta +++ b/bin/makepkgmeta @@ -59,10 +59,12 @@ esac for flav in "$METABIN"/* do [ -f "$flav" -a -x "$flav" ] || continue - PATH="$PATH:$flav.d" "$flav" $1 | lazysource + PATH="$PATH:$flav.d" "$flav" $1 >PKGMETA.tmp metaret=$? case $metaret in 0) basicmeta $1 + lazysource <PKGMETA.tmp + rm PKGMETA.tmp exit 0 ;; 1) echo "makepkgmeta: $flav encountered an error" 1>&2 exit 1 ;; |