One of my recipes in Yocto need to create a file containing a very specific line, something like:
${libdir}/something
To do this, I have the recipe task:
do_install() {
echo '${libdir}/something' >/path/to/my/file
}
Keeping in mind that I want that string exactly as shown, I can't figure out how to escape it to prevent bitbake
from substituting in its own value of libdir
.
I originally thought the echo
command with single quotes would do the trick (as it does in the bash
shell) but bitbake
must be interpreting the line before passing it to the shell. I've also tried escaping it both with $$
and \$
to no avail.
I can find nothing in the bitbake
doco about preventing variable expansion, just stuff to do with immediate, deferred and Python expansions.
What do I need to do to get that string into the file as is?