maint: fix quoting in autogen.sh

* autogen.sh (srcdir, THEDIR, OBJ_DIR): Use proper quoting.
(.git-module-status): Abort if bootstrap fails.
This commit is contained in:
Eric Blake 2010-02-22 17:01:31 -07:00 committed by Jim Meyering
parent d2a9773457
commit f1ef0e31d2

View File

@ -1,11 +1,11 @@
#!/bin/sh #!/bin/sh
# Run this to generate all the initial makefiles, etc. # Run this to generate all the initial makefiles, etc.
srcdir=`dirname $0` srcdir=`dirname "$0"`
test -z "$srcdir" && srcdir=. test -z "$srcdir" && srcdir=.
THEDIR=`pwd` THEDIR=`pwd`
cd $srcdir cd "$srcdir"
DIE=0 DIE=0
(autopoint --version) < /dev/null > /dev/null 2>&1 || { (autopoint --version) < /dev/null > /dev/null 2>&1 || {
@ -70,7 +70,10 @@ if test "$t" = "$(cat $curr_status 2>/dev/null)"; then
: # good, it's up to date : # good, it's up to date
else else
echo running bootstrap... echo running bootstrap...
./bootstrap && echo "$t" > $curr_status ./bootstrap && echo "$t" > $curr_status || {
echo "Failed to bootstrap gnulib, please investigate."
exit 1;
}
fi fi
# Automake requires that ChangeLog exist. # Automake requires that ChangeLog exist.
@ -78,9 +81,9 @@ touch ChangeLog
autoreconf -if autoreconf -if
cd $THEDIR cd "$THEDIR"
if test x$OBJ_DIR != x; then if test "x$OBJ_DIR" != x; then
mkdir -p "$OBJ_DIR" mkdir -p "$OBJ_DIR"
cd "$OBJ_DIR" cd "$OBJ_DIR"
fi fi