From 8219894fcb3c4c89b55a0dd0afcbbda4ded5aea3 Mon Sep 17 00:00:00 2001 From: David Timber Date: Sat, 28 Aug 2021 12:49:19 +0800 Subject: MIT License --- gen-copying.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 gen-copying.sh (limited to 'gen-copying.sh') 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" -- cgit