cc-test.sh:t_behave_S_freeze(): fix test number in skip message
[s-mailx.git] / make-release.sh
blob8dce5cf5df34939ccf0702a6752ef87bf758ffda
1 #!/bin/sh -
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/
9 cd .git
10 exec sh make-release.sh
12 cd ..
14 ## Variables
16 : ${PROGRAM:=s-nail}
17 : ${UPROGRAM:=S-nail}
18 : ${MANUAL:=code-nail.html}
20 : ${UPLOAD:=steffen@sdaoden.eu:/var/www/localhost/downloads}
22 # Mail
23 : ${MAILX:=s-nail -Snofollowup-to -Sreply-to=mailx -Ssmime-sign}
24 : ${ACCOUNT:=ich}
25 : ${MAILBCC:=mailx-announce-bcc}
26 : ${MAILTO:=mailx-announce}
28 ## Hooks
30 update_stable_hook() {
31 if [ -f nail.1 ]; then
32 < nail.1 > nail.1x awk '
33 BEGIN { written = 0 }
34 /\.\\"--MKREL-START--/, /\.\\"--MKREL-END--/ {
35 if (written++ != 0)
36 next
37 print ".\\\"--MKREL-START--"
38 print ".\\\"@ '"${UPROGRAM}"' v'"${REL}"' / '"${DATE_ISO}"'"
39 print ".Dd '"${DATE_MAN}"'"
40 print ".ds VV \\\\%v'"${REL}"'"
41 print ".\\\"--MKREL-END--"
42 next
44 {print}
45 ' &&
46 mv -f nail.1x nail.1
47 git add nail.1
50 if [ -f nail.rc ]; then
51 < nail.rc > nail.rcx awk '
52 BEGIN { written = 0 }
53 /^#--MKREL-START--/, /^#--MKREL-END--/ {
54 if (written++ != 0)
55 next
56 print "#--MKREL-START--"
57 print "#@ '"${UPROGRAM}"' v'"${REL}"' / '"${DATE_ISO}"'"
58 print "#--MKREL-END--"
59 next
61 {print}
62 ' &&
63 mv -f nail.rcx nail.rc
64 git add nail.rc
67 [ -f ./make-okey-map.pl ] && perl ./make-okey-map.pl && git add gen-okeys.h
68 [ -f ./make-tcap-map.pl ] && perl ./make-tcap-map.pl && git add gen-tcaps.h
69 [ -f ./make-errors.sh ] && sh ./make-errors.sh && git add gen-errors.h
72 update_release_hook() {
73 git rm -f make-news-anchors.sh
75 if [ -f nail.1 ]; then
76 sed -E -e '/^\.\\"--MKREL-(START|END)--/d' \
77 -e '/--BEGINSTRIP--/,$ {' \
78 -e '/^\.[[:space:]]*$/d' -e '/^\.[[:space:]]*\\"/d' \
79 -e '}' \
80 -e '/^\.$/d' \
81 < nail.1 > nail.1x
82 mv -f nail.1x nail.1
83 if command -v mdocmx.sh >/dev/null 2>&1; then
84 mdocmx.sh < nail.1 > nail.1x
85 mv -f nail.1x nail.1
87 git add nail.1
90 if [ -f nail.rc ]; then
91 sed -Ee '/^#--MKREL-(START|END)--/d' < nail.rc > nail.rcx
92 mv -f nail.rcx nail.rc
93 git add nail.rc
96 [ -f ./make-okey-map.pl ] &&
97 perl ./make-okey-map.pl noverbose && git add gen-okeys.h
98 [ -f ./make-tcap-map.pl ] &&
99 perl ./make-tcap-map.pl noverbose && git add gen-tcaps.h
100 [ -f ./make-errors.sh ] &&
101 sh ./make-errors.sh noverbose && git add gen-errors.h
104 . ./make-release.inc
106 # s-sh-mode