OSDN Git Service

optional mirror ask
authorpaperbenni <paperbenni@gmail.com>
Mon, 15 Jun 2020 22:37:54 +0000 (00:37 +0200)
committerpaperbenni <paperbenni@gmail.com>
Mon, 15 Jun 2020 22:37:54 +0000 (00:37 +0200)
askutils.sh
depend/mirrors.sh

index 8d0bf84..cbcf098 100755 (executable)
@@ -120,6 +120,7 @@ This could prevent the system from booting" | imenu -C; then
 
 # offer to choose mirror country
 askmirrors() {
+    iroot askmirrors 1
     curl -s 'https://www.archlinux.org/mirrorlist/' | grep -i '<option value' >/tmp/mirrors.html
     grep -v '>All<' /tmp/mirrors.html | sed 's/.*<option value=".*">\(.*\)<\/option>.*/\1/g' |
         sed -e "1iauto detect mirrors" |
index 52f9bb7..6fb14ac 100755 (executable)
@@ -4,6 +4,11 @@
 # and optionally sort them
 # auto detect all mirrors if no country is selected
 
+if ! iroot askmirrors; then
+    echo "skipping mirrors"
+    exit
+fi
+
 echo "fetching mirrors"
 
 if ! iroot automirrors; then