2 #@ mk-release.sh: simple somewhat generic release builder
4 # In order to be able to remove the release scripts from the release tarball,
5 # we must delete them, which some shells may not like while they are running.
6 # So be safe and move instances temporarily to .git/, the .inc will remove them
7 if [ "`basename \`pwd\``" != .git
]; then
8 cp mk-release.sh mk-release.inc .git
/
18 : ${UPLOAD:=steffen@sdaoden.eu:/var/www/localhost/downloads}
23 : ${MAILBCC:=mailx-announce-bcc}
24 : ${MAILTO:=mailx-announce}
28 update_stable_hook
() {
29 if [ -f nail
.1 ]; then
30 < nail
.1 > nail
.1x
awk '
32 /\.\\"--MKREL-START--/, /\.\\"--MKREL-END--/ {
35 print ".\\\"--MKREL-START--"
36 print ".\\\"@ '"${UPROGRAM}"'(1): v'"${REL}"' / '"${DATE_ISO}"'"
37 print ".Dd '"${DATE_MAN}"'"
38 print ".ds VV \\\\%v'"${REL}"'"
39 print ".\\\"--MKREL-END--"
48 if [ -f nail.rc
]; then
49 < nail.rc
> nail.rcx
awk '
51 /^#--MKREL-START--/, /^#--MKREL-END--/ {
54 print "#--MKREL-START--"
55 print "#@ '"${UPROGRAM}"'(1): v'"${REL}"' / '"${DATE_ISO}"'"
56 print "#--MKREL-END--"
61 mv -f nail.rcx nail.rc
65 [ -f .
/mk-okey-map.pl
] && .
/mk-okey-map.pl
&& git add okeys.h
66 [ -f .
/mk-tcap-map.pl
] && .
/mk-tcap-map.pl
&& git add tcaps.h
69 update_release_hook
() {
70 if [ -f nail
.1 ]; then
71 sed -E -e '/^\.\\"--MKREL-(START|END)--/d' \
72 -e '/--BEGINSTRIP--/,$ {' \
73 -e '/^\.[[:space:]]*$/d' -e '/^\.[[:space:]]*\\"/d' \
78 if command -v mdocmx.sh
>/dev
/null
2>&1; then
79 mdocmx.sh
< nail
.1 > nail
.1x
85 if [ -f nail.rc
]; then
86 sed -Ee '/^#--MKREL-(START|END)--/d' < nail.rc
> nail.rcx
87 mv -f nail.rcx nail.rc
91 [ -f .
/mk-okey-map.pl
] && .
/mk-okey-map.pl noverbose
&& git add okeys.h
92 [ -f .
/mk-tcap-map.pl
] && .
/mk-tcap-map.pl noverbose
&& git add tcaps.h