From: Fletcher T. Penney Date: Mon, 29 Aug 2016 23:01:25 +0000 (-0400) Subject: ADDED: new_source script to automate creating foo.c and foo.h X-Git-Tag: 0.1.0a~3^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b0ed20e58f83b51af3e14901662124c7693e528a;p=multimarkdown ADDED: new_source script to automate creating foo.c and foo.h --- diff --git a/new_source b/new_source new file mode 100755 index 0000000..4ef951f --- /dev/null +++ b/new_source @@ -0,0 +1,13 @@ +#!/bin/sh + +FILE=$1 + + +cp build/template.c src/$FILE.c + +perl -pi -e "s/file\.c/$FILE\.c/;" -e "s/file\.h/$FILE\.h/;" src/$FILE.c + + +cp build/template.h src/$FILE.h + +perl -pi -e "s/file\.c/$FILE\.c/;" -e "s/file\.h/$FILE\.h/;" -e "s/FILE\_/\U$FILE\_/;" src/$FILE.h