c-resources/CPlusPlus20ForProgrammers-m.../examples/libraries/cereal-1.3.0/scripts/renameincludes.sh

13 lines
269 B
Bash
Raw Normal View History

2024-04-09 06:45:18 +00:00
#!/usr/bin/env bash
destdir="include_renamed"
echo -n "New prefix: "
read newprefix
cp -r include ${destdir}
newprefix=$(echo ${newprefix} | sed -e 's/\//\\\//')
find ${destdir} -name '*.hpp' -exec sed -i "s/#include <cereal/#include <${newprefix}\/cereal/" {} \;