summaryrefslogtreecommitdiff
path: root/debian/gen_copyright
diff options
context:
space:
mode:
Diffstat (limited to 'debian/gen_copyright')
-rwxr-xr-xdebian/gen_copyright31
1 files changed, 31 insertions, 0 deletions
diff --git a/debian/gen_copyright b/debian/gen_copyright
new file mode 100755
index 0000000..4bb0b0e
--- /dev/null
+++ b/debian/gen_copyright
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+license_file=1Part/DanielByLDCO/OFL.txt
+copyright_prefix="Copyright (c)"
+rfn_prefix="with Reserved Font Name"
+
+# FIXME: replacing '<dates>' with 2016. Correct for up to part 3
+
+for dir in ?Part/*; do
+ dirname=${dir##*/}
+ name=${dirname%FontByLDCO}
+ lic_file="$dir/OFL.txt"
+ # Note the extra space left at the beginning:
+ copyright=`grep "^$copyright_prefix" "$lic_file" | \
+ sed -e "s/^$copyright_prefix//" -e 's/<dates>/<2016>/' -e 's/\r$//'`
+ rfns=`grep "^$rfn_prefix" "$lic_file" | sed -e 's/^/ /' -e 's/\r$//'`
+
+ cat <<EOF
+Files: $dir/*
+Copyright:
+$copyright
+Comment:
+$rfns
+License: OFL-1.1
+
+EOF
+done
+
+echo License: OFL-1.1
+cat "$license_file" | sed -n -e '/^This Font Software/,$p' \
+ | sed -e 's/\r$//' -e '/^$/s/^/./' -e 's/^/ /'