diff build-aux/bootstrap @ 17347:f5aaa2379bd4

bootstrap: port to FreeBSD * build-aux/bootstrap (bootstrap_sync): Port sh -c usage to shells that treat '--' differently. Reported by Mats Erik Andersson in <http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00012.html>.
author Paul Eggert <eggert@cs.ucla.edu>
date Fri, 08 Mar 2013 08:40:26 -0800
parents b037043ced60
children 71ec5ab03eb8
line wrap: on
line diff
--- a/build-aux/bootstrap	Fri Mar 08 19:50:10 2013 +0700
+++ b/build-aux/bootstrap	Fri Mar 08 08:40:26 2013 -0800
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2013-01-20.16; # UTC
+scriptversion=2013-03-08.16; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -630,9 +630,13 @@
 if $bootstrap_sync; then
   cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || {
     echo "$0: updating bootstrap and restarting..."
+    case $(sh -c 'echo "$1"' -- a) in
+      a) ignored=--;;
+      *) ignored=ignored;;
+    esac
     exec sh -c \
       'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
-      -- "$GNULIB_SRCDIR/build-aux/bootstrap" \
+      $ignored "$GNULIB_SRCDIR/build-aux/bootstrap" \
       "$0" "$@" --no-bootstrap-sync
   }
 fi