The element replace allows to specify the replacement string in a search and replace operation.
<search_replace
base = "/usr/src/mypackage">
<file>runit.sh</file>
<find>BINDIR</find>
<replace>/bin</replace>
</search_replace>
|
The equivalent bash script is :
echo Performing substitution in runit.sh cd /usr/src/mypackage cp runit.sh /tmp/foo.$$ sed -e 's/BINDIR/\/bin/' /tmp/foo.$$ > runit.sh |