From 0231e3c70e8c5261e2c4c6c142a653043880cbd5 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 9 Aug 2017 09:27:22 +0200 Subject: kann jetzt auch die Mirrorlist auf der Downloadseite updaten --- flag-names | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ update-website | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 flag-names diff --git a/flag-names b/flag-names new file mode 100644 index 0000000..82d7dd0 --- /dev/null +++ b/flag-names @@ -0,0 +1,60 @@ +au Australia +at Austria +by Belarus +be Belgium +ba Bosnia and Herzegovina +br Brazil +bg Bulgaria +ca Canada +cl Chile +cn China +co Colombia +hr Croatia +cz Czech Republic +dk Denmark +ec Ecuador +fi Finland +fr France +de Germany +gr Greece +hk Hong Kong +hu Hungary +is Iceland +in India +id Indonesia +ir Iran +ie Ireland +il Israel +it Italy +jp Japan +kz Kazakhstan +lv Latvia +lt Lithuania +lu Luxembourg +mk Macedonia +nl Netherlands +nc New Caledonia +nz New Zealand +no Norway +ph Philippines +pl Poland +pt Portugal +qa Qatar +ro Romania +ru Russia +rs Serbia +sg Singapore +sk Slovakia +si Slovenia +za South Africa +kr South Korea +es Spain +se Sweden +ch Switzerland +tw Taiwan +th Thailand +tr Turkey +ua Ukraine +gb United Kingdom +us United States +vn Vietnam diff --git a/update-website b/update-website index 0357afa..d588db0 100755 --- a/update-website +++ b/update-website @@ -14,6 +14,64 @@ cleanup() { } trap cleanup EXIT +( + printf '
\n' + curl -Ss 'https://raw.githubusercontent.com/archlinux32/packages/master/core/pacman-mirrorlist/mirrorlist?'"$( + head -c 24 /dev/urandom | \ + base64 -w0 + )" | \ + sed ' + 0,/^$/d + /^$/d + /^## /{ + s|^## |\n \n\n
| + s|$|
\n\n \n\n' + printf '
\n' +) | \ + sed -i ' + :emptyLines + /^\n*$/{ + N + bemptyLines + } + /^\(\s*\n\)*\s*
$/{ + :a + s|^.*
|| + tb + $!N + ba + :b + r /dev/stdin + } + ' "${website_dir}/download/index.html" + +exit + latest_iso_date="$( ls "${mirror_dir}/archisos" | \ grep '^archlinux-[0-9.]\+-\(dual\|i.86\)\.iso$' | \ -- cgit v1.2.3-70-g09d2