mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
shellcheck fixes
This commit is contained in:
parent
935ce606d4
commit
b69d12f10b
3 changed files with 9 additions and 7 deletions
|
@ -8,7 +8,6 @@
|
|||
|
||||
shopt -s extglob
|
||||
|
||||
# shellcheck source=functions
|
||||
. /usr/lib/archboot/common.sh
|
||||
. /usr/lib/archboot/cpio.sh
|
||||
# needed files/directories
|
||||
|
@ -191,12 +190,13 @@ if [[ -z "${KERNEL}" ]]; then
|
|||
[[ "${_RUNNING_ARCH}" == "aarch64" ]] && KERNEL="/boot/Image.gz"
|
||||
fi
|
||||
# allow * in config
|
||||
KERNEL="$(echo ${KERNEL})"
|
||||
#shellcheck disable=SC2116
|
||||
KERNEL="$(echo "${KERNEL}")"
|
||||
msg "Using kernel: ${KERNEL}"
|
||||
if [[ ! -f "${KERNEL}" ]]; then
|
||||
die "kernel image does not exist!"
|
||||
fi
|
||||
_KERNELVERSION="$(_kver ${KERNEL})"
|
||||
_KERNELVERSION="$(_kver "${KERNEL}")"
|
||||
_d_kmoduledir="/lib/modules/${_KERNELVERSION}"
|
||||
[[ -d "$_d_kmoduledir" ]] || die "'$_d_kmoduledir' is not a valid kernel module directory"
|
||||
_d_workdir="$(initialize_buildroot "${_KERNELVERSION}" "$_opttargetdir")" || exit 1
|
||||
|
|
|
@ -77,6 +77,7 @@ _exit() {
|
|||
_show_login
|
||||
exit 0
|
||||
elif [[ "${_EXIT}" == "2" ]]; then
|
||||
COUNT=0
|
||||
while true; do
|
||||
sleep 1
|
||||
_COUNT=$((_COUNT+1))
|
||||
|
@ -86,6 +87,7 @@ _exit() {
|
|||
done | _dialog --title " System Reboot " --no-mouse --gauge "Rebooting in 10 seconds. Don't forget to remove the boot medium!" 6 75 0
|
||||
reboot
|
||||
elif [[ "${_EXIT}" == "3" ]]; then
|
||||
COUNT=0
|
||||
while true; do
|
||||
sleep 1
|
||||
_COUNT=$((_COUNT+1))
|
||||
|
|
|
@ -64,6 +64,10 @@ _auto_partition() {
|
|||
}
|
||||
|
||||
_auto_create_filesystems() {
|
||||
#shellcheck disable=SC2086
|
||||
_COUNT=0
|
||||
_MAX_COUNT=$(echo ${_FSSPECS} | wc -w)
|
||||
_PROGRESS_COUNT=$((100/_MAX_COUNT))
|
||||
## make and mount filesystems
|
||||
for fsspec in ${_FSSPECS}; do
|
||||
_DEV="${_DISK}$(echo "${fsspec}" | tr -d ' ' | cut -f1 -d:)"
|
||||
|
@ -337,10 +341,6 @@ _autoprepare() {
|
|||
else
|
||||
_FSSPECS="${_FSSPEC_ROOTDEV} ${_FSSPEC_BOOTDEV} ${_FSSPEC_HOMEDEV} ${_FSSPEC_SWAPDEV}"
|
||||
fi
|
||||
#shellcheck disable=SC2086
|
||||
_MAX_COUNT=$(echo ${_FSSPECS} | wc -w)
|
||||
_PROGRESS_COUNT=$((100/_MAX_COUNT))
|
||||
_COUNT=0
|
||||
_auto_create_filesystems | _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
|
||||
|
|
Loading…
Reference in a new issue