]> git.draconx.ca Git - cdecl99.git/commitdiff
Improve bootstrap error messages.
authorNick Bowler <nbowler@draconx.ca>
Thu, 10 May 2012 01:26:21 +0000 (21:26 -0400)
committerNick Bowler <nbowler@draconx.ca>
Thu, 10 May 2012 01:26:21 +0000 (21:26 -0400)
Kill off the silly trap handler while we're at it, because it never
actually worked properly.  Just don't call die from a subshell.

bootstrap

index 170b5c37d56c6367ad6766390fce2b9ce08c5f7d..fdfd7053ec5481495a493bcb7bec8163e7e52aa6 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -1,15 +1,22 @@
 #!/bin/sh
 
-trap 'exit 1' USR1
-die() { printf '%s\n' "$@" 1>&2; kill -USR1 $$; }
+scriptname=$0
+
+err() {
+       printf '%s: %s\n' "$scriptname" "$@" 1>&2
+}
+
+die() {
+       err "$@"
+       exit 1
+}
 
 : ${AUTORECONF=autoreconf}
 : ${GNULIB=gnulib}
 : ${GIT=git}
 : ${PERL=perl}
 
-$GIT submodule update --init \
-       || echo "Failed to update submodules from git."
+$GIT submodule update --init || err "Failed to update submodules from git."
 
 if test -x $GNULIB/gnulib-tool; then
        $GNULIB/gnulib-tool --update -S || die "Failed to update Gnulib."