updated to use the fancy regex sed flag
This commit is contained in:
parent
352c849e44
commit
92b16a0244
4
otto.sh
4
otto.sh
|
@ -122,10 +122,10 @@ add_new_module () {
|
||||||
echo "copying & customizing template files..."
|
echo "copying & customizing template files..."
|
||||||
|
|
||||||
sed "s/module_name/${modname}/" $MODULE_DIR/module_name.c > $modsrc_dir/${modname}.c
|
sed "s/module_name/${modname}/" $MODULE_DIR/module_name.c > $modsrc_dir/${modname}.c
|
||||||
sed "3s/todays_date/$(date +%Y)/" $modsrc_dir/${modname}.c > $modsrc_dir/${modname}.c
|
sed -i'' "3s/todays_date/$(date +%Y)/" $modsrc_dir/${modname}.c
|
||||||
|
|
||||||
sed "s/module_name/${modname_cap}/" $MODULE_DIR/module_name.h > $modsrc_dir/${modname}.h
|
sed "s/module_name/${modname_cap}/" $MODULE_DIR/module_name.h > $modsrc_dir/${modname}.h
|
||||||
sed "3s/todays_date/$(date +%Y)/" $modsrc_dir/${modname}.h > $modsrc_dir/${modname}.h
|
sed -i'' "3s/todays_date/$(date +%Y)/" $modsrc_dir/${modname}.h
|
||||||
|
|
||||||
sed "s/module_name/${modname}/" $MODULE_DIR/CMakeLists.txt > $modsrc_dir/CMakeLists.txt
|
sed "s/module_name/${modname}/" $MODULE_DIR/CMakeLists.txt > $modsrc_dir/CMakeLists.txt
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue