aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2016-06-12 15:15:16 +0200
committerGravatar Tom Willemse2016-06-12 15:15:16 +0200
commit485057f42d060637d1ea3e0e2b76eedbbac2ae06 (patch)
treea9e4c1a7f8cd7edcc9a7316917941089013e9594
parent6093fddfffc75e65ee04cb7ad707a53cf916adc3 (diff)
downloadupdate-mirrors-485057f42d060637d1ea3e0e2b76eedbbac2ae06.tar.gz
update-mirrors-485057f42d060637d1ea3e0e2b76eedbbac2ae06.zip
Put default configuration in config.sh
-rw-r--r--config.sh22
-rwxr-xr-xupdate-mirrors8
2 files changed, 22 insertions, 8 deletions
diff --git a/config.sh b/config.sh
new file mode 100644
index 0000000..f358558
--- /dev/null
+++ b/config.sh
@@ -0,0 +1,22 @@
+## Default config.sh
+#
+# Here one can change the settings used to update the mirrors
+# configuration file.
+
+# The base URL for Archlinux's mirror list
+url="https://www.archlinux.org/mirrorlist"
+
+# Mirrors in which countries should be selected
+countries=("BE" "NL")
+
+# Mirrors with which protocols should be selected
+protocols=("http" "https")
+
+# Mirrors with which IP versions should be selected
+ip_versions=(4)
+
+# Should the mirror status be used to select mirrors
+use_mirror_status="on"
+
+# Where should the mirror list be saved.
+dest="/etc/pacman.d/mirrorlist"
diff --git a/update-mirrors b/update-mirrors
index cf27b21..a17b19e 100755
--- a/update-mirrors
+++ b/update-mirrors
@@ -1,13 +1,5 @@
#!/bin/bash
-# Changeable options
-url="https://www.archlinux.org/mirrorlist"
-countries=("BE" "NL")
-protocols=("http" "https")
-ip_versions=(4)
-use_mirror_status="on"
-dest="/etc/pacman.d/mirrorlist"
-
# Functions
function fold () { /usr/bin/fold --spaces --width=$(tput cols); }