summaryrefslogtreecommitdiff
path: root/functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'functions.sh')
-rw-r--r--functions.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/functions.sh b/functions.sh
index e44b8a7..8d8db9c 100644
--- a/functions.sh
+++ b/functions.sh
@@ -25,6 +25,15 @@ process_distro() {
source "distro/$1/install.sh"
ISOFILE="$(basename $ISOURL)"
ISOMNT="/media/$ISOFILE"
+ MIRRORLIST=(`cat "distro/$1/mirrorlist"`)
+}
+
+download_iso() {
+ for url in ${MIRRORLIST[@]}
+ do
+ wget -O "isofiles/$ISOFILE" "$url/$ISOURL" && return 0
+ done
+ fatalerror "Fail to download $ISOFILE!"
}
mount_iso() {