Skip to contentSkip to conversation

make gdbbuild exit on error

PATCH In review Horms 2 participants 3 messages Sep 4, 2006 – Sep 6, 2006

lore
Share & tools
lore

Horms

author
#0 lore raw

PATCH 1/1 make gdbbuild exit on error

If an error occurs, such as wget failing because the site (or proxy) is unavailable, the script will now terminate, rather than trying to soldier on without any real hope of success.

mkbuildtree should really get the same treatment, but that can wait for another day.

 tools/debugger/gdb/gdbbuild |    2 ++
 1 file changed, 2 insertions(+)
tools/debugger/gdb/gdbbuild +2 -0
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+set -x
+
 [ "$GDB_MIRROR" ] || GDB_MIRROR="ftp://ftp.gnu.org/gnu/gdb/"
 
 rm -rf gdb-6.2.1 gdb-6.2.1-linux-i386-xen
#1 lore raw
Quoted 3 lines · Horms

If an error occurs, such as wget failing because the site (or proxy) is unavailable, the script will now terminate, rather than trying to soldier on without any real hope of success.

<snip>

tools/debugger/gdb/gdbbuild line 4

Quoted 2 lines
tools/debugger/gdb/gdbbuild +2 -0
+set -x
+

Shouldn't that be '-e' ? to exit

Yours Tony

linux.conf.au http://linux.conf.au/ || http://lca2007.linux.org.au/
Jan 15-20 2007 The Australian Linux Technical Conference!

author
#2 lore raw
Quoted 11 lines · Tony Breeds
Quoted 3 lines · Horms

If an error occurs, such as wget failing because the site (or proxy) is unavailable, the script will now terminate, rather than trying to soldier on without any real hope of success.

<snip>

tools/debugger/gdb/gdbbuild line 4

Quoted 2 lines
tools/debugger/gdb/gdbbuild +2 -0
+set -x
+

Shouldn't that be '-e' ? to exit

Yes, sorry for the noise.

Signature · 28 lines
Horms
  H: http://www.vergenet.net/~horms/
  W: http://www.valinux.co.jp/en/

[GDBSERVER] make gdbbuild exit on error

If an error occurs, such as wget failing because the site (or proxy)
is unavailable, the script will now terminate, rather than trying
to soldier on without any real hope of success.

mkbuildtree should really get the same treatment, but that
can wait for another day.

Signed-Off-By: Simon Horman <[email protected]>

 tools/debugger/gdb/gdbbuild |    2 ++
 1 file changed, 2 insertions(+)

--- 0001/tools/debugger/gdb/gdbbuild
+++ work/tools/debugger/gdb/gdbbuild	2006-09-04 13:01:57.000000000 +0900
@@ -1,5 +1,7 @@
 #!/bin/sh
 
+set -e
+
 [ "$GDB_MIRROR" ] || GDB_MIRROR="ftp://ftp.gnu.org/gnu/gdb/"
 
 rm -rf gdb-6.2.1 gdb-6.2.1-linux-i386-xen