aboutsummaryrefslogtreecommitdiff
path: root/gen-copying.sh
diff options
context:
space:
mode:
Diffstat (limited to 'gen-copying.sh')
-rwxr-xr-xgen-copying.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/gen-copying.sh b/gen-copying.sh
new file mode 100755
index 0000000..1fb330f
--- /dev/null
+++ b/gen-copying.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+gen () {
+ local out="$1"
+ local head="$2"
+ local foot="$3"
+ local lprefix="$4"
+ local lsuffix="$5"
+ local l
+
+ echo "$head" > "$out"
+ while read l; do
+ echo "$lprefix$l$lsuffix" >> "$out"
+ done
+ echo "$foot" >> "$out"
+}
+
+PATH_COPYING="COPYING"
+OUT_PREFIX="COPYING"
+
+gen "$OUT_PREFIX.line" "" "" "" "" < "$PATH_COPYING"
+gen "$OUT_PREFIX.c" "/*" "*/" "* " "" < "$PATH_COPYING"
+gen "$OUT_PREFIX.sharp" "" "" "# " "" < "$PATH_COPYING"
+gen "$OUT_PREFIX.xml" "<!--" "-->" " " "" < "$PATH_COPYING"
+gen "$OUT_PREFIX.dd" "--" "--" "-- " "" < "$PATH_COPYING"