From: Bruno Haible Date: Sat, 28 Feb 2009 02:23:18 +0000 (+0100) Subject: Make a sed expression POSIX compliant. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6ba8350847a11b3867163113ed559a222c38832d;p=pspp Make a sed expression POSIX compliant. --- diff --git a/ChangeLog b/ChangeLog index 79abe824ca..f4131d6aea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-02-27 Bruno Haible + + * gnulib-tool (func_import): Make the sed expression used to create the + sed script for updating the .gitignore file POSIX compliant. + Reported by Eric Blake. + 2009-02-27 Bruno Haible * gnulib-tool (sed): Don't alias as "sed --posix". diff --git a/gnulib-tool b/gnulib-tool index a870a00678..4f254b4a78 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -3571,7 +3571,7 @@ s,//*$,/,' echo "Updating $destdir/$dir$ignore (backup in $destdir/$dir${ignore}~)" mv -f "$destdir/$dir$ignore" "$destdir/$dir$ignore"~ { sed -e 's,/,\\/,g' -e 's,^,/^,' -e 's,$,\$/d,' < "$tmp"/ignore-removed - if test -n "$anchor"; then sed -e 's,/,\\/,g' -e "s,^,/^${doubly_escaped_anchor}," -e 's,$,\$/d,' < "$tmp"/ignore-removed; fi + if test -n "$anchor"; then sed -e 's,/,\\/,g' -e "s,^,/^${doubly_escaped_anchor}," -e 's,$,$/d,' < "$tmp"/ignore-removed; fi } > "$tmp"/sed-ignore-removed { cat "$destdir/$dir$ignore"~ sed -e "s|^|$anchor|" < "$tmp"/ignore-added