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
66 update_release_hook
() {
67 if [ -f nail
.1 ]; then
68 sed -E -e '/^\.\\"--MKREL-(START|END)--/d' \
69 -e '/--BEGINSTRIP--/,$ {' \
70 -e '/^\.[[:space:]]*$/d' -e '/^\.[[:space:]]*\\"/d' \
75 if command -v mdocmx.sh
>/dev
/null
2>&1; then
76 mdocmx.sh
< nail
.1 > nail
.1x
82 if [ -f nail.rc
]; then
83 sed -Ee '/^#--MKREL-(START|END)--/d' < nail.rc
> nail.rcx
84 mv -f nail.rcx nail.rc