Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/update-website
diff options
context:
space:
mode:
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