Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=yaxmenu.git;a=commitdiff;h=7b2f4073bb59458322f919f8a7501457f4c1df27

commit 7b2f4073bb59458322f919f8a7501457f4c1df27
Author: James Buren <r...@frugalware.org>
Date:   Mon Nov 30 23:17:02 2009 -0600

generate-c-files.bash
* initial draft

diff --git a/tools/generate-c-files.bash b/tools/generate-c-files.bash
new file mode 100755
index 0000000..a4fadb4
--- /dev/null
+++ b/tools/generate-c-files.bash
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+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}"
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to