From 72448bd677ec46c31df99121bb7fcc66d783899f Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Thu, 3 Aug 2023 19:38:42 +0200 Subject: [PATCH] add progressbar on script update --- usr/lib/archboot/update/manage.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/usr/lib/archboot/update/manage.sh b/usr/lib/archboot/update/manage.sh index ebf0984cd..5130c3d86 100644 --- a/usr/lib/archboot/update/manage.sh +++ b/usr/lib/archboot/update/manage.sh @@ -150,13 +150,11 @@ _progress_wait() { _download_latest() { # Download latest setup and quickinst script from git repository - echo -e "\e[1mStart:\e[m Downloading latest archboot from GIT master tree..." [[ -d "${_INST}" ]] || mkdir "${_INST}" # config - echo -e "\e[1mStep 1/4:\e[m Downloading latest config..." wget -q "${_SOURCE}${_ETC}/defaults?inline=false" -O "${_ETC}/defaults" # helper binaries - echo -e "\e[1mStep 2/4:\e[m Downloading latest scripts..." + _progress "33" "Downloading latest scripts..." # main binaries BINS="quickinst setup clock launcher localize network pacsetup update copy-mountpoint rsync-backup restore-usbstick" for i in ${BINS}; do @@ -172,7 +170,7 @@ _download_latest() { [[ -e "${_HELP}/${i}" ]] && wget -q "${_SOURCE}${_HELP}/${i}?inline=false" -O "${_HELP}/${i}" done # main libs - echo -e "\e[1mStep 3/4:\e[m Downloading latest script libs..." + _progress "66" "Downloading latest script libs..." LIBS="basic-common.sh common.sh container.sh release.sh iso.sh login.sh cpio.sh" for i in ${LIBS}; do wget -q "${_SOURCE}${_LIB}/${i}?inline=false" -O "${_LIB}/${i}" @@ -188,13 +186,14 @@ _download_latest() { wget -q "${_SOURCE}${_RUN}/${i}?inline=false" -O "${_RUN}/${i}" done # setup libs - echo -e "\e[1mStep 4/4:\e[m Downloading latest setup libs..." + _progress "90" "Downloading latest setup libs..." LIBS="autoconfiguration.sh quicksetup.sh base.sh blockdevices.sh bootloader.sh btrfs.sh common.sh \ configuration.sh mountpoints.sh network.sh pacman.sh partition.sh storage.sh" for i in ${LIBS}; do wget -q "${_SOURCE}${_INST}/${i}?inline=false" -O "${_INST}/${i}" done - echo -e "\e[1mFinished:\e[m Downloading scripts done." + _progress "100" "Downloading scripts done." + sleep 2 } _new_environment() {