mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
add progressbar to quicksetup
This commit is contained in:
parent
adbdd8a4ca
commit
4baf67ab1d
2 changed files with 10 additions and 6 deletions
|
@ -340,15 +340,15 @@ _mountpoints() {
|
|||
_mkfs() {
|
||||
if [[ -n "${4}" ]]; then
|
||||
if [[ "${2}" == "swap" ]]; then
|
||||
_dialog --no-mouse --infobox "Creating and activating\nswapspace on ${1}..." 0 0
|
||||
_progress "${_COUNT}" "Creating and activating\nswapspace on ${1}..."
|
||||
else
|
||||
_dialog --no-mouse --infobox "Creating ${2} on ${1},\nmounting to ${3}${5}..." 0 0
|
||||
_progress "${_COUNT}" "Creating ${2} on ${1},\nmounting to ${3}${5}..."
|
||||
fi
|
||||
else
|
||||
if [[ "${2}" == "swap" ]]; then
|
||||
_dialog --no-mouse --infobox "Activating swapspace \non ${1}..." 0 0
|
||||
_progress "${_COUNT}" "Activating swapspace \non ${1}..."
|
||||
else
|
||||
_dialog --no-mouse --infobox "Mounting ${2} \non ${1} \nto ${3}${5}..." 0 0
|
||||
_progress "${_COUNT}" "Mounting ${2} \non ${1} \nto ${3}${5}..." 0 0
|
||||
fi
|
||||
fi
|
||||
# add btrfs raid level, if needed
|
||||
|
|
|
@ -275,6 +275,9 @@ _autoprepare() {
|
|||
else
|
||||
_FSSPECS="${_FSSPEC_ROOTDEV} ${_FSSPEC_BOOTDEV} ${_FSSPEC_HOMEDEV} ${_FSSPEC_SWAPDEV}"
|
||||
fi
|
||||
_MAX_COUNT=$(($(echo ${_FSSPECS} | wc -w)+1))
|
||||
_PROGRESS_COUNT=$((100/_MAX_COUNT))
|
||||
_COUNT=0
|
||||
## make and mount filesystems
|
||||
for fsspec in ${_FSSPECS}; do
|
||||
_DEV="${_DISK}$(echo "${fsspec}" | tr -d ' ' | cut -f1 -d:)"
|
||||
|
@ -306,8 +309,9 @@ _autoprepare() {
|
|||
if [[ "${_FSTYPE}" == "btrfs" ]]; then
|
||||
btrfs subvolume set-default "${_DESTDIR}"/"${_MP}" || return 1
|
||||
fi
|
||||
done
|
||||
_dialog --no-mouse --infobox "Quick Setup was successful." 3 40
|
||||
_COUNT=$((_COUNT+_PROGRESS_COUNT))
|
||||
done | _dialog --title " Filesystems " --no-mouse --gauge "Creating Filesystems on ${_DISK}..." 6 75 0
|
||||
_dialog --title " Success " --no-mouse --infobox "Quick Setup was successful." 3 40
|
||||
sleep 3
|
||||
_S_QUICK_SETUP=1
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue