Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/update-website
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2022-02-05 16:13:09 +0100
committerAndreas Baumann <mail@andreasbaumann.cc>2022-02-05 16:13:09 +0100
commitd98ebcfca34d5a9adc0e4c2d1ad6bfdeaabbdd6d (patch)
tree6e004e7b03fe797f6d6e049a157d53cfe327e40b /update-website
parentd538d138b2e47043054e53cdf079f8d6b1cffafb (diff)
much more cleanup
Diffstat (limited to 'update-website')
-rwxr-xr-xupdate-website28
1 files changed, 11 insertions, 17 deletions
diff --git a/update-website b/update-website
index c653820..2d735a1 100755
--- a/update-website
+++ b/update-website
@@ -220,24 +220,18 @@ date=$(echo "${iso}" \
# update magnet links
if [ -s "${tmp_dir}/magnet.link.set" ]; then
- if ! tr '&' '\n' < \
- "${tmp_dir}/magnet.link.set" | \
- grep -qxF "dn=${iso}"; then
- sed -i '
- /<li>(<strike>)?<a href="magnet:?.*-'"${arch}"'\.iso/ s/href="[^"]\+"/href="'"$(sed 's|&|\\&|g' "${tmp_dir}/magnet.link.set")"'"/
- /title="Magnet link">Magnet link for \S\+ ('"${desc}"')/ s/>Magnet link for \S\+ />Magnet link for '"${date}"' /
- ' "${website_dir}/download/index.html"
- else
- >&2 printf 'Magnet link for %s is not for %s, skipping.\n' "${arch}" "${iso}"
- fi
+ sed -i '
+ /<li><a href="magnet:?.*-'"${arch}"'\.iso/ s/href="[^"]\+"/href="'"$(sed 's|&|\\&|g' "${tmp_dir}/magnet.link.set")"'"/
+ /title="Magnet link">Magnet link for \S\+ ('"${desc}"')/ s/>Magnet link for \S\+ />Magnet link for '"${date}"' /
+ ' "${website_dir}/download/index.html"
fi
# update torrent links
if [ -s "${tmp_dir}/torrent-seed.set" ]; then
if grep -qF "archlinux32-${date}-${arch}" "${tmp_dir}/torrent-seed.set"; then
sed -i '
- /<li>(<strike>)?<a href="http.*-'"${arch}"'\.iso.torrent/ s/href="[^"]\+"/href="'"$(sed -e 's_/_\\/_g' "${tmp_dir}/torrent-seed.set")"'"/
- /title="Download torrent">Torrent for \S\+ ('"${desc["${arch}"]}"')/ s/>Torrent for \S\+ />Torrent for '"${date}"' /
+ /<li><a href="http.*-'"${arch}"'\.iso.torrent/ s|href="[^"]\+"|href="'"$(cat "${tmp_dir}/torrent-seed.set")"'"|
+ /title="Download torrent">Torrent for \S\+ ('"${desc}"')/ s/>Torrent for \S\+ />Torrent for '"${date}"' /
' "${website_dir}/download/index.html"
else
>&2 printf 'Torrent seed for %s is not for %s, skipping.\n' "${arch}" "${iso}"
@@ -250,11 +244,11 @@ if [ -s "${tmp_dir}/update_iso.set" ]; then
>&2 echo "Can't find iso to arch '${mirror_dir}/archisos/${iso}'."
exit 1
fi
- kernel="$("${base_dir}"/check-iso --output-dir "${mirror_dir}/archisos" --kernel-version)"
- size="$("${base_dir}"/check-iso --output-dir "${mirror_dir}/archisos" --size)"
- md5="$("${base_dir}"/check-iso --output-dir "${mirror_dir}/archisos" --md5sum)"
- sha512="$("${base_dir}"/check-iso --output-dir "${mirror_dir}/archisos" --sha512sum)"
- sign_key="$("${base_dir}"/check-iso --output-dir "${mirror_dir}/archisos" --sign-key)"
+ kernel="$("${base_dir}"/check-iso --iso="${iso}" --output-dir "${mirror_dir}/archisos" --kernel-version)"
+ size="$("${base_dir}"/check-iso --iso="${iso}" --output-dir "${mirror_dir}/archisos" --size)"
+ md5="$("${base_dir}"/check-iso --iso="${iso}" --output-dir "${mirror_dir}/archisos" --md5sum)"
+ sha512="$("${base_dir}"/check-iso --iso="${iso}" --output-dir "${mirror_dir}/archisos" --sha512sum)"
+ sign_key="$("${base_dir}"/check-iso --iso="${iso}" --output-dir "${mirror_dir}/archisos" --sign-key)"
fi
# adapt release info on the top