summaryrefslogtreecommitdiff
path: root/debian/gen_copyright
blob: 4bb0b0edb04b1defdf4a980fd1170fb12331e99c (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
25
26
27
28
29
30
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/^/ /'