2 #@ make-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 make-release.
* .git
/
10 exec sh make-release.sh
14 command -v perl
>/dev
/null
2>&1 ||
exit 42
20 : ${MANUAL:=code-nail.html}
22 : ${UPLOAD:=steffen@sdaoden.eu:/var/www/localhost/downloads}
25 : ${MAILX:=s-nail -Snofollowup-to -Sreply-to=mailx -Ssmime-sign}
27 : ${MAILBCC:=mailx-announce-bcc}
28 : ${MAILTO:=mailx-announce}
32 update_stable_hook
() {
33 if [ -f nail
.1 ]; then
34 < nail
.1 > nail
.1x
awk '
36 /\.\\"--MKREL-START--/, /\.\\"--MKREL-END--/ {
39 print ".\\\"--MKREL-START--"
40 print ".\\\"@ '"${UPROGRAM}"' v'"${REL}"' / '"${DATE_ISO}"'"
41 print ".Dd '"${DATE_MAN}"'"
42 print ".ds VV \\\\%v'"${REL}"'"
43 print ".\\\"--MKREL-END--"
52 if [ -f nail.rc
]; then
53 < nail.rc
> nail.rcx
awk '
55 /^#--MKREL-START--/, /^#--MKREL-END--/ {
58 print "#--MKREL-START--"
59 print "#@ '"${UPROGRAM}"' v'"${REL}"' / '"${DATE_ISO}"'"
60 print "#--MKREL-END--"
65 mv -f nail.rcx nail.rc
69 [ -f .
/make-okey-map.pl
] && perl .
/make-okey-map.pl
&& git add gen-okeys.h
70 [ -f .
/make-tcap-map.pl
] && perl .
/make-tcap-map.pl
&& git add gen-tcaps.h
71 [ -f .
/make-errors.sh
] && sh .
/make-errors.sh
&& git add gen-errors.h
74 update_release_hook
() {
75 git
rm -f make-news-anchors.sh
77 if [ -f nail
.1 ]; then
78 sed -E -e '/^\.\\"--MKREL-(START|END)--/d' \
79 -e '/--BEGINSTRIP--/,$ {' \
80 -e '/^\.[[:space:]]*$/d' -e '/^\.[[:space:]]*\\"/d' \
85 if command -v mdocmx.sh
>/dev
/null
2>&1; then
86 mdocmx.sh
< nail
.1 > nail
.1x
92 if [ -f nail.rc
]; then
93 sed -Ee '/^#--MKREL-(START|END)--/d' < nail.rc
> nail.rcx
94 mv -f nail.rcx nail.rc
98 [ -f .
/make-okey-map.pl
] &&
99 perl .
/make-okey-map.pl noverbose
&& git add gen-okeys.h
100 [ -f .
/make-tcap-map.pl
] &&
101 perl .
/make-tcap-map.pl noverbose
&& git add gen-tcaps.h
102 [ -f .
/make-errors.sh
] &&
103 sh .
/make-errors.sh noverbose
&& git add gen-errors.h