refactor buildroot bundle retrieval

- expand curl options
- remove --local for direct download
- add --continue-at to resume downloading unfinished file
- remove checking for file existence
- remove --verbose as --continue-at spams the output
- remove --silent to see errors if any
[ci skip]
pull/369/head
Paul Philippov 2022-08-16 16:53:58 -04:00
parent 8830cb0249
commit 45d531afde
1 changed files with 4 additions and 6 deletions

View File

@ -78,11 +78,9 @@ fresh() {
echo_c 31 "Buildroot sources not found." echo_c 31 "Buildroot sources not found."
fi fi
if [ ! -f ${SRC_CACHE_DIR}/buildroot-${BR_VER}.tar.gz ]; then echo_c 34 "Downloading Buildroot sources to cache directory ..."
echo_c 34 "Downloading Buildroot sources to cache directory ..." log_and_run "curl --continue-at - --output ${SRC_CACHE_DIR}/buildroot-${BR_VER}.tar.gz https://buildroot.org/downloads/buildroot-${BR_VER}.tar.gz"
log_and_run "curl -s -v -k -L -o ${SRC_CACHE_DIR}/buildroot-${BR_VER}.tar.gz https://buildroot.org/downloads/buildroot-${BR_VER}.tar.gz" echo_c 34 "Done.\n"
echo_c 34 "Done.\n"
fi
echo_c 34 "Extracting a fresh copy of Buildroot from Buildroot sources ..." echo_c 34 "Extracting a fresh copy of Buildroot from Buildroot sources ..."
log_and_run "tar xvf ${SRC_CACHE_DIR}/buildroot-${BR_VER}.tar.gz" log_and_run "tar xvf ${SRC_CACHE_DIR}/buildroot-${BR_VER}.tar.gz"
@ -138,7 +136,7 @@ rename_initramfs() {
autoup_rootfs() { autoup_rootfs() {
echo_c 34 "Downloading u-boot-hi3518ev200-universal.bin" echo_c 34 "Downloading u-boot-hi3518ev200-universal.bin"
curl -L -o ./output/images/u-boot-hi3518ev200-universal.bin \ curl --location --output ./output/images/u-boot-hi3518ev200-universal.bin \
https://github.com/OpenIPC/firmware/releases/download/latest/u-boot-hi3518ev200-universal.bin https://github.com/OpenIPC/firmware/releases/download/latest/u-boot-hi3518ev200-universal.bin
echo_c 34 "Making autoupdate firmware image" echo_c 34 "Making autoupdate firmware image"