add progressbar on script update

This commit is contained in:
Tobias Powalowski 2023-08-03 19:38:42 +02:00
parent 6f6344012a
commit 72448bd677

View file

@ -150,13 +150,11 @@ _progress_wait() {
_download_latest() { _download_latest() {
# Download latest setup and quickinst script from git repository # 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}" [[ -d "${_INST}" ]] || mkdir "${_INST}"
# config # config
echo -e "\e[1mStep 1/4:\e[m Downloading latest config..."
wget -q "${_SOURCE}${_ETC}/defaults?inline=false" -O "${_ETC}/defaults" wget -q "${_SOURCE}${_ETC}/defaults?inline=false" -O "${_ETC}/defaults"
# helper binaries # helper binaries
echo -e "\e[1mStep 2/4:\e[m Downloading latest scripts..." _progress "33" "Downloading latest scripts..."
# main binaries # main binaries
BINS="quickinst setup clock launcher localize network pacsetup update copy-mountpoint rsync-backup restore-usbstick" BINS="quickinst setup clock launcher localize network pacsetup update copy-mountpoint rsync-backup restore-usbstick"
for i in ${BINS}; do for i in ${BINS}; do
@ -172,7 +170,7 @@ _download_latest() {
[[ -e "${_HELP}/${i}" ]] && wget -q "${_SOURCE}${_HELP}/${i}?inline=false" -O "${_HELP}/${i}" [[ -e "${_HELP}/${i}" ]] && wget -q "${_SOURCE}${_HELP}/${i}?inline=false" -O "${_HELP}/${i}"
done done
# main libs # 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" LIBS="basic-common.sh common.sh container.sh release.sh iso.sh login.sh cpio.sh"
for i in ${LIBS}; do for i in ${LIBS}; do
wget -q "${_SOURCE}${_LIB}/${i}?inline=false" -O "${_LIB}/${i}" 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}" wget -q "${_SOURCE}${_RUN}/${i}?inline=false" -O "${_RUN}/${i}"
done done
# setup libs # 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 \ 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" configuration.sh mountpoints.sh network.sh pacman.sh partition.sh storage.sh"
for i in ${LIBS}; do for i in ${LIBS}; do
wget -q "${_SOURCE}${_INST}/${i}?inline=false" -O "${_INST}/${i}" wget -q "${_SOURCE}${_INST}/${i}?inline=false" -O "${_INST}/${i}"
done done
echo -e "\e[1mFinished:\e[m Downloading scripts done." _progress "100" "Downloading scripts done."
sleep 2
} }
_new_environment() { _new_environment() {