Check-in [cb5ff1a1e0]
Overview
Comment:Emit links to downloads
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: cb5ff1a1e0a85b37eea94cebcbf81b8b46f43cb5
User & Date: rkeene on 2020-04-01 18:37:57
Other Links: manifest | tags
Context
2020-04-01
19:03
Ensure that pthread condition variable in logging is initialized check-in: f278a98272 user: rkeene tags: trunk
18:37
Emit links to downloads check-in: cb5ff1a1e0 user: rkeene tags: trunk
17:41
Post-release version increment check-in: f55e303e9f user: rkeene tags: trunk
Changes

Modified build/update-wiki from [2d105e6f53] to [ec1a1b5a36].

1
2
3
4
5
6
7
8
9
10
11
































































#! /bin/bash

sourcedir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

(
	echo '<H2>NAME</H2>'
	man2html -H linux.die.net -M /man -p "${sourcedir}/filed.1" | \
		sed '0,/<H2>NAME<\/H2>/ d;/<H2>Index<\/H2>/,$ d;s@<A HREF="../index.html">Return to Main Contents</A>@@;s@\[@\&#91;@g;s@\]@\&#93;@g' | \
		sed '$ d;/^ *$/ d' | \
		sed 's@\(http://linux.die.net/man/[^+]*\)+@\1/@'
) | fossil wiki commit Manual











































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#! /bin/bash

sourcedir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"

(
	echo '<H2>NAME</H2>'
	man2html -H linux.die.net -M /man -p "${sourcedir}/filed.1" | \
		sed '0,/<H2>NAME<\/H2>/ d;/<H2>Index<\/H2>/,$ d;s@<A HREF="../index.html">Return to Main Contents</A>@@;s@\[@\&#91;@g;s@\]@\&#93;@g' | \
		sed '$ d;/^ *$/ d' | \
		sed 's@\(http://linux.die.net/man/[^+]*\)+@\1/@'
) | fossil wiki commit Manual

function emit_links() {
	local releases version filename
	local platform url
	local platform_str
	declare -A version_url
	declare -A url_platform

	while IFS='/' read -r releases version filename; do
		platform="$(echo "${filename}" | sed 's@filed-[^-]*-@@')"
		url="/uv/${releases}/${version}/${filename}"

		version_url["${version}"]+="${url} "
		url_platform["${url}"]="${platform}"
	done < <(fossil uv ls | grep '^releases/')

	version_url['1.20']="/raw/filed-1.20-x86_64-redhat5-linux?name=ac52d7b72827e8a59b59c6ef60672e7f7679a7f3 /raw/filed-1.20-x86_64-generic-linux-musl?name=667854fd89867d925fd68144bfc140ed599a7c88 /raw/filed-1.20-i486-slackware-linux?name=d31af3a8af918f3d86bd21356f172d74c2613788 /raw/filed-1.20-mipsel-generic-linux-uclibc?name=9997701dcf0990fdef2b26cfa0b6541ee3d8b3ec /raw/filed-1.20-mips-unknown-linux-musl?name=f57701950166898abaaa4867b93e936a8df089df /raw/filed-1.20-arm-slackware-linux-gnueabi?name=81d528777aa976f7316560bb9622d4da75831266 "
	url_platform['/raw/filed-1.20-x86_64-redhat5-linux?name=ac52d7b72827e8a59b59c6ef60672e7f7679a7f3']='x86_64-redhat5-linux'
	url_platform['/raw/filed-1.20-x86_64-generic-linux-musl?name=667854fd89867d925fd68144bfc140ed599a7c88']='x86_64-generic-linux-musl'
	url_platform['/raw/filed-1.20-i486-slackware-linux?name=d31af3a8af918f3d86bd21356f172d74c2613788']='i486-slackware-linux'
	url_platform['/raw/filed-1.20-mipsel-generic-linux-uclibc?name=9997701dcf0990fdef2b26cfa0b6541ee3d8b3ec']='mipsel-generic-linux-uclibc'
	url_platform['/raw/filed-1.20-mips-unknown-linux-musl?name=f57701950166898abaaa4867b93e936a8df089df']='mips-unknown-linux-musl'
	url_platform['/raw/filed-1.20-arm-slackware-linux-gnueabi?name=81d528777aa976f7316560bb9622d4da75831266']='arm-slackware-linux-gnueabi'

	for version in $(echo "${!version_url[@]}" | xargs -n1 | sort -rV); do
		echo "   1. Version ${version}:"
		for url in $(echo ${version_url["${version}"]} | xargs -n1 | sort -d); do
			platform="${url_platform["${url}"]}"

			case "${platform}" in
				x86_64-*-linux-musl)
					platform_str='Linux/x86_64 (static)'
					;;
				i?86-*-linux|i?86-*-linux-gnu*)
					platform_str='Linux/x86'
					;;
				mipsel-*-linux-uclibc)
					platform_str='Linux/MIPS (uClibc)'
					;;
				mips-*-linux-musl)
					platform_str='Linux/MIPS (static)'
					;;
				arm-*-linux|arm-*-linux-gnu*)
					platform_str='Linux/ARM'
					;;
				x86_64-*-linux|x86_64-*-linux-gnu*)
					platform_str='Linux/x86_64'
					;;
				aarch64-*-linux|aarch64-*-linux-gnu*)
					platform_str='Linux/AArch64'
					;;
				*)
					platform_str="${platform}"
					;;
			esac

			echo "     1. [${platform_str}](${url})"
		done
	done
}

emit_links

exit 0