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
18 : ${MANUAL:=code-nail.html}
20 : ${UPLOAD:=steffen@sdaoden.eu:/var/www/localhost/downloads}
23 : ${MAILX:=s-nail -Snofollowup-to -Ssmime-sign}
25 : ${MAILBCC:=mailx-announce-bcc}
26 : ${MAILTO:=mailx-announce}
30 update_stable_hook
() {
31 if [ -f nail
.1 ]; then
32 < nail
.1 > nail
.1x
awk '
34 /\.\\"--MKREL-START--/, /\.\\"--MKREL-END--/ {
37 print ".\\\"--MKREL-START--"
38 print ".\\\"@ '"${UPROGRAM}"'(1): v'"${REL}"' / '"${DATE_ISO}"'"
39 print ".Dd '"${DATE_MAN}"'"
40 print ".ds VV \\\\%v'"${REL}"'"
41 print ".\\\"--MKREL-END--"
50 if [ -f nail.rc
]; then
51 < nail.rc
> nail.rcx
awk '
53 /^#--MKREL-START--/, /^#--MKREL-END--/ {
56 print "#--MKREL-START--"
57 print "#@ '"${UPROGRAM}"'(1): v'"${REL}"' / '"${DATE_ISO}"'"
58 print "#--MKREL-END--"
63 mv -f nail.rcx nail.rc
67 [ -f .
/make-okey-map.pl
] && .
/make-okey-map.pl
&& git add gen-okeys.h
68 [ -f .
/make-tcap-map.pl
] && .
/make-tcap-map.pl
&& git add gen-tcaps.h
69 [ -f .
/make-errors.sh
] && .
/make-errors.sh
&& git add gen-errors.h
72 update_release_hook
() {
73 if [ -f nail
.1 ]; then
74 sed -E -e '/^\.\\"--MKREL-(START|END)--/d' \
75 -e '/--BEGINSTRIP--/,$ {' \
76 -e '/^\.[[:space:]]*$/d' -e '/^\.[[:space:]]*\\"/d' \
81 if command -v mdocmx.sh
>/dev
/null
2>&1; then
82 mdocmx.sh
< nail
.1 > nail
.1x
88 if [ -f nail.rc
]; then
89 sed -Ee '/^#--MKREL-(START|END)--/d' < nail.rc
> nail.rcx
90 mv -f nail.rcx nail.rc
94 [ -f .
/make-okey-map.pl
] &&
95 .
/make-okey-map.pl noverbose
&& git add gen-okeys.h
96 [ -f .
/make-tcap-map.pl
] &&
97 .
/make-tcap-map.pl noverbose
&& git add gen-tcaps.h
98 [ -f .
/make-errors.sh
] &&
99 .
/make-errors.sh noverbose
&& git add gen-errors.h