Added more regex for substitution of the date.
This commit is contained in:
parent
7f07a2956e
commit
7ce94f3ecd
4
otto.sh
4
otto.sh
|
@ -109,7 +109,11 @@ 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 "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 "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
|
||||||
|
|
||||||
sed "s/module_name/${modname}/" $MODULE_DIR/test_module_name.c > $modtest_dir/test_${modname}.c
|
sed "s/module_name/${modname}/" $MODULE_DIR/test_module_name.c > $modtest_dir/test_${modname}.c
|
||||||
|
|
Loading…
Reference in New Issue