diff options
author | David Timber <mieabby@gmail.com> | 2021-08-28 12:49:19 +0800 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2021-08-31 18:39:34 +0800 |
commit | 8219894fcb3c4c89b55a0dd0afcbbda4ded5aea3 (patch) | |
tree | a90202d987b2edae520a5745c021a7cb3b8552ce /gen-copying.sh | |
parent | 2f319a0867e607251e9fc419560b73bf9b205cea (diff) |
MIT License
Diffstat (limited to 'gen-copying.sh')
-rwxr-xr-x | gen-copying.sh | 24 |
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" |