[Toybox] Sed problem

David Halls dahalls at gmail.com
Fri Mar 13 13:29:17 PDT 2015


I'm trying to compile libiconv. It has this in its configure script:

  sed -e '/^func_dirname ()$/,/^} # func_dirname /c\
func_dirname ()\
{\
\    case ${1} in\
\      */*) func_dirname_result="${1%/*}${2}" ;;\
\      *  ) func_dirname_result="${3}" ;;\
\    esac\
} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \

This results in the following being generated:

func_dirname ()
{
\    case ${1} in
\      */*) func_dirname_result="${1%/*}${2}" ;;
\      *  ) func_dirname_result="${3}" ;;
\    esac
} # Extended-shell func_dirname implementation

i.e. backslashes are left in, which bash barfs on.

The busybox sed stripped out the backslashes, and libiconv compiled fine.
Is Toybox sed only stripping out eol backslashes?

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20150313/3b24a254/attachment-0003.htm>


More information about the Toybox mailing list