+2009-02-27 Bruno Haible <bruno@clisp.org>
+
+ * 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 <bruno@clisp.org>
* gnulib-tool (sed): Don't alias as "sed --posix".
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