Developing lightweight computation at the DSG edge

Commit 0a638808 authored by Roger Pueyo Centelles's avatar Roger Pueyo Centelles
Browse files

Properly parse download URLs for SDK and IB


Signed-off-by: default avatarRoger Pueyo Centelles <roger.pueyo@guifi.net>
parent 65bf25ab
......@@ -356,7 +356,7 @@ download_sdk() {
local output="$release/$target"
[ ! -d "$output" ] && mkdir -p "$output"
local sdk_file="$(wget -q -O- $url | grep openwrt-sdk | grep href | awk -F\> '{print $4}' | awk -F\< '{print $1}')"
local sdk_file="$(wget -q -O- $url | grep openwrt-sdk | grep -Eoi '<a [^>]+>' | grep -Eo 'href="[^\"]+"' | cut -d '=' -f 2 | sed 's/\"//g')"
echo "-> Downloading $url/$sdk_file"
wget -c "$url/$sdk_file" -O "$tmp_dir/$sdk_file" || {
echo "-> Error, cannot download SDK $url/$sdk_file"
......@@ -394,7 +394,7 @@ download_ib() {
local url="$base_url/$target"
local output="$release/$target"
[ ! -d "$output" ] && mkdir -p "$output"
local ib_file="$(wget -q -O- $url | grep openwrt-imagebuilder | grep href | awk -F\> '{print $4}' | awk -F\< '{print $1}')"
local ib_file="$(wget -q -O- $url | grep openwrt-imagebuilder | grep -Eoi '<a [^>]+>' | grep -Eo 'href="[^\"]+"' | cut -d '=' -f 2 | sed 's/\"//g')"
echo "-> Downloading $url/$ib_file"
wget -c "$url/$ib_file" -O "$tmp_dir/$ib_file" || {
echo "-> Error, cannot download ImageBuilder $url/$ib_file"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment