diff options
author | JulioJu | 2016-05-30 14:05:32 +0200 |
---|---|---|
committer | JulioJu | 2016-05-30 14:05:32 +0200 |
commit | 83c7ae3348b91b8e85ef7eb4c15c3c01c868c2b4 (patch) | |
tree | 83e199572a46650c1f43791d2dfaa22d3b7479ed | |
parent | 428e145cc0215570f0deb584672b13c25bf79dc0 (diff) | |
download | aur-83c7ae3348b91b8e85ef7eb4c15c3c01c868c2b4.tar.gz |
Use wget
-rw-r--r-- | PKGBUILD | 4 | ||||
-rw-r--r-- | marionnet_from_scratch-Downloader | 24 |
2 files changed, 15 insertions, 13 deletions
@@ -15,7 +15,7 @@ users to define, configure and run complex computer networks without any need for physical setup. Trunk version (with UML kernel Debian Wheezy)." arch=('i686' 'x86_64') url="https://www.marionnet.org/" -makedepends=('bc' 'optipng') +makedepends=('wget' 'bc' 'optipng') license=('LGPL') depends=('xorg-server' 'xorg-xinit' 'xorg-server-utils' 'gtksourceview2' 'libglademm' 'graphviz' 'xterm' 'vde2' 'uml_utilities' 'net-tools' 'bridge-utils') if test "$CARCH" == x86_64; then @@ -35,7 +35,7 @@ sha256sums=('4f81ab86258be0eea1507dd5338c8670490f8616249821e731f8ac1c64caa4a7' '646b6de59a555b2e41960708cf4edfed571d88369d850a50e23bf4a4b17ed329' '610c806e595be4d56ff6cded02e8d8a3091fe211487073c02ddb5132c3b4ffb6' 'efb09389cc67a88b16509dec3ca3fb32f1da1f4c5808b8f2e7e2f050376bf691' - '5d8ddf6e5c5b726e892bae2b55eb5eb01f43bd47fa2855ec38797d0598a6ea24') + 'f0f93f30424da231357c3d7698229ba1fbdaa41737c954b71ede44d5e57cd50a') install=marionnet-trunk.install # ################ diff --git a/marionnet_from_scratch-Downloader b/marionnet_from_scratch-Downloader index c363d74d3ab1..9e92d34b0630 100644 --- 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———" } |