]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
extract-trace: only source funclib.sh when $progname is extract-trace.
authorGary V. Vaughan <gary@gnu.org>
Thu, 18 Oct 2012 16:41:53 +0000 (23:41 +0700)
committerGary V. Vaughan <gary@gnu.org>
Thu, 18 Oct 2012 16:41:53 +0000 (23:41 +0700)
* build-aux/extract-trace: $usage is too generic, and can cause
sourced extract-trace to re-source options-parser.  We already
require that funclib.sh be sourced before sourcing options-parser,
so it's safer to check that $progname is correct before sourcing
options-parser again from here.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
build-aux/extract-trace

index 2143c76f9c745efec350930bffb6d84fb65e383f..d8be25cab86f12791341471c7d4f6e0999493320 100755 (executable)
@@ -1,8 +1,8 @@
 #! /bin/sh
 
 # Make sure we've evaluated scripts we depend on.
-test -n "$progpath" || . `echo "$0" |${SED-sed} 's|[^/]*$||'`/funclib.sh
-test -n "$usage" || . `echo "$0" |${SED-sed} 's|[^/]*$||'`/options-parser
+test -z "$progpath" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/funclib.sh
+test extract-trace = "$progname" && . `echo "$0" |${SED-sed} 's|[^/]*$||'`/options-parser
 
 # Set a version string.
 scriptversion=2012-10-07.10; # UTC