From: jkratoch <> Date: Thu, 11 Jun 2009 19:32:09 +0000 (+0000) Subject: Do not abort on the first error. X-Git-Url: https://git.jankratochvil.net/?p=nethome.git;a=commitdiff_plain;h=32eead02314ee499cbd6372601a21342462489a4 Do not abort on the first error. --- diff --git a/bin/gdbunpack b/bin/gdbunpack index ea60ac2..04e23b9 100755 --- a/bin/gdbunpack +++ b/bin/gdbunpack @@ -2,6 +2,8 @@ # $Id$ # Extract gdb.sum+gdb.log from the Fedora/Red Hat gdb rpm build log. +rc=0 + force=false if [ "$1" = "-f" ];then force=true @@ -26,6 +28,7 @@ for log in $args;do fi if [ "$base" = "$log" -o "$log" != "${log%/gdb.log}" -o "$log" = "gdb.log" ];then echo >&2 "file has no .log suffix or is gdb.log: $log" + rc=1 continue fi if ($force || $clean) && test -d "$base";then @@ -36,23 +39,28 @@ for log in $args;do fi if ! mkdir "$base";then echo >&2 "Error <$log>: mkdir" - exit 1 + rc=1 + continue fi if ! (cd "$base";uudecode) <"$log";then echo >&2 "Error <$log>: uudecode" - exit 1 + rc=1 + continue fi if echo -n "$base"/*|grep ' ';then echo >&2 "Error <$log>: Too many files in: $base" - exit 1 + rc=1 + continue fi if ! (echo -n "$base"/*|grep -q '[.]tar[.]bz2$');then echo >&2 "Error <$log>: Invalid file:" "$base"/* - exit 1 + rc=1 + continue fi if ! (cd "$base";tar xjf *);then echo >&2 "Error <$log>: tar xjf" - exit 1 + rc=1 + continue fi rm -f "$base"/*.tar.bz2 chmod -x "$base"/* @@ -63,4 +71,7 @@ for log in $args;do # mv -f "$base"/*.log "$base"/gdb.log # mv -f "$base"/*.sum "$base"/gdb.sum done -echo OK +if [ $rc -eq 0 ];then + echo OK +fi +exit $rc