27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
-
+
+
-
+
|
fi
return 0
}
# Generate the new downloads page
function generateDownloads() {
local version tarball sha256
local version tarball sha256 manualPDF
version="$1"
tarball="$2"
sha256="$3"
manualPDF="$4"
if [ -z "${version}" -o -z "${tarball}" ]; then
return 0
fi
echo 'Tcl Nano'
echo '========'
echo ''
echo "Current release: **${version}**"
echo ''
echo " - [Manual](/uv/manuals/tcl-nano-${version}-manual.pdf)"
echo " - [Manual](/uv/${manualPDF})"
echo ' - Downloads:'
echo " - [Source](/uv/${tarball}) <small>(SHA2-256: ${sha256})</small>"
echo ''
echo "Older releases may be found in the [archives](/uvlist)."
return 0
}
|
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
-
+
|
tclNanoReleaseManualPDFTmp="$(mktemp -u)"
fossil uv cat "${tclNanoReleaseTarball}" 2>/dev/null | gzip -dc 2>/dev/null | tar --wildcards -xOf - '*/nano.man' | groff -mandoc -Tpdf > "${tclNanoReleaseManualPDFTmp}"
fossil uv add "${tclNanoReleaseManualPDFTmp}" --as "${tclNanoReleaseManualPDF}"
rm -f "${tclNanoReleaseManualPDFTmp}"
fi
# Generate the new download page entry
downloadsPage="$(generateDownloads "${tclNanoReleaseVersion}" "${tclNanoReleaseTarball}" "${tclNanoReleaseTarballSHA256}")"
downloadsPage="$(generateDownloads "${tclNanoReleaseVersion}" "${tclNanoReleaseTarball}" "${tclNanoReleaseTarballSHA256}" "${tclNanoReleaseManualPDF}")"
updatePage "${wikiPageDownloads}" "${downloadsPage}" 'markdown'
# Push changes if any have been made
fossil sync
fossil uv sync
exit 0
|