mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
shellcheck fixes
This commit is contained in:
parent
cd5d3c0e4c
commit
673fd3ce05
5 changed files with 6 additions and 7 deletions
|
@ -17,7 +17,6 @@ _d_install=/lib/initcpio/install
|
|||
# options and runtime data
|
||||
_optgenimg=''
|
||||
_opttargetdir=''
|
||||
_optosrelease=''
|
||||
_optquiet=1 _optcolor=1
|
||||
declare -A _addedmodules _modpaths
|
||||
# Sanitize environment further
|
||||
|
|
|
@ -144,7 +144,7 @@ add_firmware() {
|
|||
local -i r=1
|
||||
fwpath=/lib/firmware
|
||||
for fw; do
|
||||
# shellcheck disable=SC2154
|
||||
# shellcheck disable=SC2154,SC2153
|
||||
if ! compgen -G "${BUILDROOT}${fwpath}/${fw}?(.*)" &>/dev/null; then
|
||||
if read -r fwfile < <(compgen -G "${fwpath}/${fw}?(.*)"); then
|
||||
map add_file "${fwfile[@]}"
|
||||
|
@ -303,7 +303,7 @@ add_binary() {
|
|||
initialize_buildroot() {
|
||||
# creates a temporary directory for the buildroot and initialize it with a
|
||||
# basic set of necessary directories and symlinks
|
||||
local workdir='' kernver="$1" arch buildroot osreleasefile
|
||||
local workdir='' kernver="$1" arch buildroot
|
||||
arch="$(uname -m)"
|
||||
if ! workdir="$(mktemp -d --tmpdir mkinitcpio.XXXXXX)"; then
|
||||
error 'Failed to create temporary working directory in %s' "${TMPDIR:-/tmp}"
|
||||
|
|
|
@ -42,7 +42,8 @@ _config() {
|
|||
_PRESET="${_PRESET_DIR}/${_PRESET}"
|
||||
#shellcheck disable=SC1090
|
||||
source "${_PRESET}"
|
||||
[[ -z "${_IMAGENAME}" ]] && _IMAGENAME="archboot-$(date +%Y.%m.%d-%H.%M)-$(_kver ${ALL_kver})-${_ARCH}"
|
||||
#shellcheck disable=SC2154
|
||||
[[ -z "${_IMAGENAME}" ]] && _IMAGENAME="archboot-$(date +%Y.%m.%d-%H.%M)-$(_kver "${ALL_kver}")-${_ARCH}"
|
||||
}
|
||||
|
||||
### EFI status of RISCV64:
|
||||
|
|
|
@ -100,7 +100,7 @@ _run_update_installer() {
|
|||
sleep 1
|
||||
_COUNT=$((_COUNT+1))
|
||||
# abort after 10 seconds
|
||||
_progress "$((${_COUNT}*10))" "Waiting $((10-${_COUNT})) seconds to stop the process with CTRL-C..."
|
||||
_progress "$((_COUNT*10))" "Waiting $((10-_COUNT)) seconds to stop the process with CTRL-C..."
|
||||
[[ "${_COUNT}" == 10 ]] && break
|
||||
done | _dialog --title " Stop Processing? " --no-mouse --gauge "Waiting 10 seconds to stop the process with CTRL-C..." 6 60 0
|
||||
if [[ "$(grep -w MemTotal /proc/meminfo | cut -d ':' -f2 | sed -e 's# ##g' -e 's#kB$##g')" -lt 2571000 ]]; then
|
||||
|
|
|
@ -34,9 +34,8 @@ _create_iso() {
|
|||
# create container
|
||||
archboot-"${_ARCH}"-create-container.sh "${_W_DIR}" -cc --install-source="${2}" || exit 1
|
||||
_create_archboot_db "${_W_DIR}${_CACHEDIR}"
|
||||
_KERNEL_VERSION="$(${_NSPAWN} ${_W_DIR} /bin/bash -c ". /usr/lib/archboot/common.sh; _kver $(grep 'kver' ${_W_DIR}/etc/archboot/presets/${_ARCH} | cut -d '=' -f2)")"
|
||||
_KERNEL_VERSION="$(${_NSPAWN} "${_W_DIR}" /bin/bash -c ". /usr/lib/archboot/common.sh; _kver $(grep 'kver' "${_W_DIR}/etc/archboot/presets/${_ARCH}" | cut -d '=' -f2)")"
|
||||
_ISONAME="archboot-$(date +%Y.%m.%d-%H.%M)-${_KERNEL_VERSION}"
|
||||
echo $_KERNEL_VERSION $_ISONAME
|
||||
# riscv64 does not support kexec at the moment
|
||||
if ! [[ "${_ARCH}" == "riscv64" ]]; then
|
||||
# generate tarball in container, umount tmp container tmpfs, else weird things could happen
|
||||
|
|
Loading…
Reference in a new issue