linux - Pipe redirection fails on pre/post-build steps in the Code::Blocks -
i'm trying following on post-build step (build options... / pre/post build steps) in code::blocks 16.01 (build: feb2 2016, 03:15:41 - wx2.8.12 (linux,unicode) - 64 bit): pymodule="`printf ${project_name}.so | sed 's/^lib/_/'`"
fails showing in build log: s/^lib/_/'`"': 1: s/^lib/_/'`"': syntax error: eof in backquote substitution
then tried echo libdaoc.so | sed 's/^lib/_/'
works fine in terminal, in code::blocks pre/post build step, pipe operation fails showing in build log: echo libdaoc.so | sed 's/^lib/_/' usage: sed [option]... {script-only-if-no-other-script} [input-file]... -n, --quiet, --silent suppress automatic printing of pattern space ...
how make work?
i'm trying make builds code::blocks environment , export via cbp2make, need use environment variables instead of hardcoded fixed names.
no need sed
, posix shell can same job using parameter substitution:
pymodule="_${project_name#lib}.so"
the above assumes prefix "lib" exists, (the op seems imply should).
Comments
Post a Comment