changeset 30260:70bd4c4db6c5

allow renaming bootstrap, and change the name of bootstrap.conf accordingly 2008-10-02 Paolo Bonzini <bonzini@gnu.org> * build-aux/bootstrap: Allow renaming bootstrap, and change the name of bootstrap.conf accordingly.
author Paolo Bonzini <bonzini@gnu.org>
date Thu, 02 Oct 2008 11:03:52 +0200
parents ad047166777f
children 05fa0e19a085
files ChangeLog build-aux/bootstrap
diffstat 2 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Oct 02 11:01:16 2008 +0200
+++ b/ChangeLog	Thu Oct 02 11:03:52 2008 +0200
@@ -1,3 +1,8 @@
+2008-10-02  Paolo Bonzini  <bonzini@gnu.org>
+
+	* build-aux/bootstrap: Allow renaming bootstrap, and change the
+	name of bootstrap.conf accordingly.
+
 2008-10-02  Paolo Bonzini  <bonzini@gnu.org>
 
 	* build-aux/bootstrap: Install git-merge-changelog configuration
--- a/build-aux/bootstrap	Thu Oct 02 11:01:16 2008 +0200
+++ b/build-aux/bootstrap	Thu Oct 02 11:03:52 2008 +0200
@@ -49,7 +49,7 @@
                           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 @@
 vc_ignore=auto
 
 # 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" ;;
+esac
+
 
 if test "$vc_ignore" = auto; then
   vc_ignore=