diff --git a/scripts/module-create.sh b/scripts/module-create.sh index cab6ae3..6bd34f6 100755 --- a/scripts/module-create.sh +++ b/scripts/module-create.sh @@ -43,6 +43,22 @@ then exit 1 fi + + +# function used to replace variables +# assumes that we're in the directory to replace files in +# for each argument X, it will replace @X@ with ${X} +do_parameter_subst() { + do_cmd source ~/.lwbuildrc || exit 1 + for param in AUTHOR EMAIL VIM_MODELINE KATE_MODELINE $@ + do + seds="${seds} -e s,@${param}@,${!param},g" + done + do_cmd find . -type f -exec sed ${seds} -i {} \; || exit 1 +} + + + source ${TEMPLATE}/instantiate