Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=fwpl.git;a=commitdiff;h=aa052859821617ab7373c4119996badf3e283ea2

commit aa052859821617ab7373c4119996badf3e283ea2
Author: James Buren <r...@frugalware.org>
Date:   Thu Sep 17 14:10:48 2009 -0500

generate-c-files.sh
* initial draft

diff --git a/tools/generate-c-files.sh b/tools/generate-c-files.sh
new file mode 100755
index 0000000..3caf053
--- /dev/null
+++ b/tools/generate-c-files.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+if [ -z "${1}" ]; then
+       echo "Usage: ${0} <name>"
+       exit 1
+fi
+
+A="_${1/-/_}_header_"
+B="${1}.h"
+C="${1}.c"
+
+echo "#ifndef ${A}"      >> "${B}"
+echo "#define ${A}"      >> "${B}"
+echo "#endif"            >> "${B}"
+
+echo "#include \"${B}\"" >> "${C}"
\ No newline at end of file
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to