mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
dynamic progressbar
This commit is contained in:
parent
5a8e9f374d
commit
d513363534
3 changed files with 14 additions and 10 deletions
|
@ -49,7 +49,7 @@ _vconsole_keymap() {
|
|||
fi
|
||||
}
|
||||
|
||||
_task() {
|
||||
_localize_task() {
|
||||
echo "LANG=${_LOCALE}.UTF-8" > /etc/locale.conf
|
||||
echo "LANG=${_LOCALE}.UTF-8" > /.localize
|
||||
echo LC_COLLATE=C >> /etc/locale.conf
|
||||
|
@ -71,7 +71,7 @@ _task() {
|
|||
|
||||
_run() {
|
||||
: >/.archboot
|
||||
_task &
|
||||
_localize_task &
|
||||
_progress_wait "0" "99" "Using ${_LOCALE}.UTF-8 and ${_KEYMAP}..." "0.01"
|
||||
_progress "100" "Localization completed successfully."
|
||||
sleep 2
|
||||
|
|
|
@ -41,7 +41,7 @@ if [[ -n "${_D_SCRIPTS}" ]]; then
|
|||
_network_check
|
||||
: > /.update
|
||||
_TITLE="Archboot $(uname -m) | Basic Setup | GIT Master Scripts"
|
||||
_download_latest | _dialog --title " Archboot GIT Master " --gauge "Downloading latest config..." 6 75 0
|
||||
_download_latest | _dialog --title " Archboot GIT Master " --gauge "Downloading latest GIT..." 6 75 0
|
||||
clear
|
||||
fi
|
||||
# Generate new environment and launch it with kexec
|
||||
|
|
|
@ -129,13 +129,10 @@ _create_initramfs() {
|
|||
rm "${_W_DIR}"/.archboot
|
||||
}
|
||||
|
||||
_download_latest() {
|
||||
# Download latest setup and quickinst script from git repository
|
||||
[[ -d "${_INST}" ]] || mkdir "${_INST}"
|
||||
_download_latest_task() {
|
||||
# config
|
||||
wget -q "${_SOURCE}${_ETC}/defaults?inline=false" -O "${_ETC}/defaults"
|
||||
# helper binaries
|
||||
_progress "25" "Downloading latest scripts..."
|
||||
# main binaries
|
||||
_SCRIPTS="quickinst setup clock launcher localize network pacsetup update copy-mountpoint rsync-backup restore-usbstick"
|
||||
for i in ${_SCRIPTS}; do
|
||||
|
@ -151,7 +148,6 @@ _download_latest() {
|
|||
[[ -e "${_HELP}/${i}" ]] && wget -q "${_SOURCE}${_HELP}/${i}?inline=false" -O "${_HELP}/${i}"
|
||||
done
|
||||
# main libs
|
||||
_progress "50" "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}"
|
||||
|
@ -167,7 +163,6 @@ _download_latest() {
|
|||
wget -q "${_SOURCE}${_RUN}/${i}?inline=false" -O "${_RUN}/${i}"
|
||||
done
|
||||
# setup libs
|
||||
_progress "75" "Downloading latest setup libs..."
|
||||
LIBS="autoconfiguration.sh quicksetup.sh base.sh blockdevices.sh bootloader.sh \
|
||||
bootloader_sb.sh bootloader_grub.sh bootloader_uki.sh bootloader_systemd_bootd.sh \
|
||||
bootloader_limine.sh bootloader_pacman_hooks.sh bootloader_refind.sh \
|
||||
|
@ -176,7 +171,16 @@ _download_latest() {
|
|||
for i in ${LIBS}; do
|
||||
wget -q "${_SOURCE}${_INST}/${i}?inline=false" -O "${_INST}/${i}"
|
||||
done
|
||||
_progress "100" "Downloading scripts done."
|
||||
rm /.archboot
|
||||
}
|
||||
|
||||
_download_latest() {
|
||||
# Download latest setup and quickinst script from git repository
|
||||
[[ -d "${_INST}" ]] || mkdir "${_INST}"
|
||||
: > /.archboot
|
||||
_download_latest_task &
|
||||
_progress_wait "0" "99" "Downloading latest GIT..." "0.01"
|
||||
_progress "100" "Downloading... done."
|
||||
sleep 2
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue