summarylogtreecommitdiffstats
path: root/marionnet_from_scratch-Downloader
diff options
context:
space:
mode:
Diffstat (limited to 'marionnet_from_scratch-Downloader')
-rwxr-xr-x[-rw-r--r--]marionnet_from_scratch-Downloader24
1 files changed, 13 insertions, 11 deletions
diff --git a/marionnet_from_scratch-Downloader b/marionnet_from_scratch-Downloader
index c363d74d3ab1..9e92d34b0630 100644..100755
--- a/marionnet_from_scratch-Downloader
+++ b/marionnet_from_scratch-Downloader
@@ -52,9 +52,8 @@ trap_custom
# @todo
-# FOR UPDATE THIS SCRIPT, PLEASE MAINTAINS TUNNING SECTION
-# FOR UPDATE THIS SCRIPT, PLEASE MAINTAINS TUNNING SECTION
-# FOR UPDATE THIS SCRIPT, PLEASE MAINTAINS TUNNING SECTION
+# sha256sums (ask to Lodo to but them onto this webpage) + calculate weight with
+# http headers + use dictionnary with weight URL and weight
# =============================================================
# PARSING COMMAND LINE {{{1
@@ -316,11 +315,14 @@ fi 1>&2
# FUNCTIONS FOR DOWNLOAD OUR KERNELS AND FILESYSTEMS {{{1
# =============================================================
+# Support https:
+alias wget='wget --no-check-certificate'
+
function download_our_kernels {
# global $OUR_BASE_URL
# parameters : file-weight $1
local KERNELS
-KERNELS=$(curl -L --silent --show-error "$OUR_BASE_URL" \
+KERNELS=$(wget -O - "$OUR_BASE_URL" \
| grep -o 'href="kernels_[^"]*"' \
| grep -o "kernels_[^\"]*[.]tar[.]gz"\
)
@@ -346,7 +348,7 @@ function download_our_big_filesystems {
# global $OUR_BASE_URL
# parameters : file-weight $1
local FILESYSTEMS
-FILESYSTEMS=$(curl -L --silent --show-error "$OUR_BASE_URL" \
+FILESYSTEMS=$(wget -O - "$OUR_BASE_URL" \
| grep -o 'href="filesystems_[^"]*"' \
| grep -o "filesystems_[^\"]*[.]tar[.]gz"\
| grep -v "filesystems_pinocchio.*[.]tar[.]gz"\
@@ -366,7 +368,7 @@ function download_our_pinocchio_filesystems {
# global $OUR_BASE_URL
# parameters : file-weight $1
local KERNELS
-KERNELS=$(curl -L --silent --show-error "$OUR_BASE_URL" \
+KERNELS=$(wget -O - "$OUR_BASE_URL" \
| grep -o 'href="kernels_[^"]*"' \
| grep -o "kernels_[^\"]*[.]tar[.]gz"\
)
@@ -380,7 +382,7 @@ function download_our_v1_kernels {
# global $OUR_TRUNK_SPECIFIC_URL
# parameters : file-weight $1
local KERNELS
-KERNELS=$(curl -L --silent --show-error "$OUR_TRUNK_SPECIFIC_URL" \
+KERNELS=$(wget -O - "$OUR_TRUNK_SPECIFIC_URL" \
| grep -o 'href="kernels_[^"]*"' \
| grep -o "kernels_[^\"]*[.]tar[.]gz"\
)
@@ -394,7 +396,7 @@ function download_our_v1_tiny_filesystems {
# global $OUR_TRUNK_SPECIFIC_URL
# parameters : file-weight $1
local FILESYSTEMS
-FILESYSTEMS=$(curl -L --silent --show-error "$OUR_TRUNK_SPECIFIC_URL" \
+FILESYSTEMS=$(wget -O - "$OUR_TRUNK_SPECIFIC_URL" \
| grep -o 'href="filesystems_guignol[^"]*"' \
| grep -o "filesystems_[^\"]*[.]tar[.]gz"\
)
@@ -408,7 +410,7 @@ function download_our_v1_big_filesystems {
# global $OUR_TRUNK_SPECIFIC_URL
# parameters : file-weight $1
local FILESYSTEMS
-FILESYSTEMS=$(curl -L --silent --show-error "$OUR_TRUNK_SPECIFIC_URL" \
+FILESYSTEMS=$(wget -O - "$OUR_TRUNK_SPECIFIC_URL" \
| grep -o 'href="filesystems_[^"]*"' \
| grep -o "filesystems_[^\"]*[.]tar[.]gz"\
| grep -v "filesystems_guignol.*[.]tar[.]gz"\
@@ -427,12 +429,12 @@ local restPerCent=$(echo "scale=2;$rest/$total_weight*100"|bc)
echo -e "We are going to download $3 Mo ($currentPercentDownloading% of the $total_weight Mo). \
After this stage this is still $rest Mo to download (or \
$restPerCent%) "
-curl -L -O -C - $1 # -C - => resume download if any ; -L => follow redirections
+wget --continue $1 # -C - => resume download if any ; -L => follow redirections
# @todo sha256sums
echo "Decompressing : "
# tar -xvf ${2}
rm -f ${2}
-echo -e "Success…\n\n\n———"
+echo -e "Success…\n———"
}