ocamllabs / opam-doc

Produce documentation for libraries installed with OPAM
22 stars 9 forks source link

fix sed in Makefile when path contains '+' #100

Closed ghost closed 10 years ago

ghost commented 10 years ago

to avoid this error:

sed -e "s+__OCAMLC__+/home/jdimino/.opam/4.01.0+fp/bin/ocamlc+" < scripts/ocamlc > /home/jdimino/code/opam-tmp/system/bin/opam-doc-ocamlc
sed: -e expression #1, char 41: unknown option to `s'
make: *** [install] Error 1
samoht commented 10 years ago

Thanks

pw374 commented 10 years ago

This patch makes the assumption that | is less likely to occur in a path than +, which is probably true. However if a | occurs, it is just as broken. :-/ I wonder if it'd be worth escaping the sed separation character by using another sed invocation on ${OCAMLC}...