mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
move progress_wait up
This commit is contained in:
parent
701a314520
commit
f37fb2af53
1 changed files with 15 additions and 15 deletions
|
@ -21,6 +21,21 @@ ${2}
|
|||
XXX
|
||||
EOF
|
||||
}
|
||||
# $1: start percentage $2: end percentage $3: message $4: sleep time
|
||||
_progress_wait() {
|
||||
_COUNT=${1}
|
||||
while true; do
|
||||
if [[ "${_COUNT}" -lt "${2}" ]]; then
|
||||
_progress "${_COUNT}" "${3}"
|
||||
fi
|
||||
if [[ "${_COUNT}" -gt "${2}" ]]; then
|
||||
_progress "${2}" "${3}"
|
||||
fi
|
||||
_COUNT="$((_COUNT+1))"
|
||||
read -r -t "${4}"
|
||||
! [[ -e /.archboot ]] && break
|
||||
done
|
||||
}
|
||||
_task() {
|
||||
[[ "${1}" == kernel ]] && bsdcpio -u -i "*/lib/modules/" "*/lib/firmware/" <"/mnt/boot/initrd-$(uname -m).img" &>/dev/null
|
||||
if [[ "${1}" == cleanup ]]; then
|
||||
|
@ -55,21 +70,6 @@ _task() {
|
|||
fi
|
||||
rm /.archboot
|
||||
}
|
||||
# $1: start percentage $2: end percentage $3: message $4: sleep time
|
||||
_progress_wait() {
|
||||
_COUNT=${1}
|
||||
while true; do
|
||||
if [[ "${_COUNT}" -lt "${2}" ]]; then
|
||||
_progress "${_COUNT}" "${3}"
|
||||
fi
|
||||
if [[ "${_COUNT}" -gt "${2}" ]]; then
|
||||
_progress "${2}" "${3}"
|
||||
fi
|
||||
_COUNT="$((_COUNT+1))"
|
||||
read -r -t "${4}"
|
||||
! [[ -e /.archboot ]] && break
|
||||
done
|
||||
}
|
||||
_first_stage() {
|
||||
cd /
|
||||
# move in modules from main initrd
|
||||
|
|
Loading…
Reference in a new issue