aboutsummaryrefslogtreecommitdiff
path: root/gen-copying.sh
blob: 1fb330ffe93dbd6964e5337172a955e72669d35e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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"