[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Support renaming bootstrap

From: Paolo Bonzini
Subject: [PATCH] Support renaming bootstrap
Date: Mon, 29 Sep 2008 14:08:34 +0200
User-agent: Thunderbird (Macintosh/20080914)

GNU sed calls the bootstrap script autoboot because "bootstrap.sh" is
taken by the no-configure-script bootstrapping tool.

This patch allows renaming the bootstrap script, so that the
configuration file is named correspondingly.

Are there packages calling the script bootstrap.sh?  This would break
compatibility.  Otherwise, ok?


2008-09-29  Paolo Bonzini  <address@hidden>

        * build-aux/bootstrap: Support renaming the bootstrap

diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 74fa3eb..2866770 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -49,7 +49,7 @@ Options:
                           not to have been checked out.
  --skip-po                Do not download po files.

-If the file bootstrap.conf exists in the current working directory, its
+If the file $0.conf exists in the same directory as this script, its
 contents are read as shell variables to configure the bootstrap.

 Running without arguments will suffice in most cases.
@@ -146,7 +146,13 @@ copy=false

 # Override the default configuration, if necessary.
-test -r bootstrap.conf && . ./bootstrap.conf
+# Make sure that bootstrap.conf is sourced from the current directory
+# if we were invoked as "sh bootstrap".
+case "$0" in
+  */*) test -r "$0.conf" && . "$0.conf" ;;
+  *) test -r "$0.conf" && . ./"$0.conf" ;;

 if test "$vc_ignore" = auto; then

reply via email to

[Prev in Thread] Current Thread [Next in Thread]