I have tried putting the following in my Makefile:
@if [ $(DEMO) -eq 0 ]; then \
cat sys.conf | sed -e "s#^public_demo[\s=].*$#public_demo=0#" >sys.conf.temp; \
else \
cat sys.conf | sed -e "s#^public_demo[\s=].*$#public_demo=1#" >sys.conf.temp; \
fi
but when I run make, I get the following error:
sed: -e expression #1, char 30: unterminated `s' command
If I run the exact lines that contain sed
in the console, they behave correctly.
Why am I getting this error and how can the problem be fixed?