Compare commits

...

2 commits

Author SHA1 Message Date
Tobias Powalowski
fd36bf73fc shellcheck fixes 2024-09-08 22:41:25 +02:00
Tobias Powalowski
74efa02b7d refactor messages, don't create tempdirs on options listing 2024-09-08 22:31:33 +02:00
7 changed files with 17 additions and 17 deletions

View file

@ -60,6 +60,7 @@ if [[ -n "${_G_RELEASE}" ]]; then
clear clear
fi fi
# install custom xorg or wayland # install custom xorg or wayland
#shellcheck disable=SC2128
if [[ -n "${_CUSTOM_X}" || -n "${_CUSTOM_WAYLAND}" ]]; then if [[ -n "${_CUSTOM_X}" || -n "${_CUSTOM_WAYLAND}" ]]; then
_custom_wayland_xorg _custom_wayland_xorg
fi fi

View file

@ -42,9 +42,11 @@ _linux_firmware() {
_marvell_firmware() { _marvell_firmware() {
_MARVELL=() _MARVELL=()
for i in $(fd -t f . /lib/modules/"${_RUNNING_KERNEL}" | rg -w 'wireless/marvell'); do for i in $(fd -t f . /lib/modules/"${_RUNNING_KERNEL}" | rg -w 'wireless/marvell'); do
#shellcheck disable=SC2207
_MARVELL+=($(basename "${i}" | sd '.ko.*$' '')) _MARVELL+=($(basename "${i}" | sd '.ko.*$' ''))
done done
# check marvell modules if already loaded # check marvell modules if already loaded
#shellcheck disable=SC2068
for i in ${_MARVELL[@]}; do for i in ${_MARVELL[@]}; do
if lsmod | rg -qw "${i}"; then if lsmod | rg -qw "${i}"; then
_PACKAGES+=(linux-firmware-marvell) _PACKAGES+=(linux-firmware-marvell)

View file

@ -2,20 +2,17 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# created by Tobias Powalowski <tpowa@archlinux.org> # created by Tobias Powalowski <tpowa@archlinux.org>
. /etc/archboot/defaults . /etc/archboot/defaults
_ISODIR="$(mktemp -d ISODIR.XXX)"
_BOOTLOADER="/usr/share/archboot/bootloader" _BOOTLOADER="/usr/share/archboot/bootloader"
_usage () { _usage () {
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create ${_ARCH} ISO Image\e[m" echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create ${_ARCH} ISO Image\e[m"
echo -e "\e[1m--------------------------------------\e[m" echo -e "\e[1m----------------------------------------\e[m"
echo "This will create an Archboot ISO image." echo "Create an Archboot ISO image: <name>.iso"
echo echo
echo "Options:" echo "Options:"
echo -e " \e[1m-g\e[m Start generation of an ISO image." echo -e " \e[1m-g\e[m Start generation of an ISO image"
echo -e " \e[1m-c=CONFIG\e[m Which CONFIG should be used." echo -e " \e[1m-c=CONFIG\e[m CONFIG from ${_CONFIG_DIR}: default=${_ARCH}.conf"
echo " ${_CONFIG_DIR} includes the config files" echo -e " \e[1m-i=ISO\e[m Customize ISO name"
echo " default=${_ARCH}.conf"
echo -e " \e[1m-i=ISO\e[m Your custom ISO name."
echo -e " \e[1m-s\e[m Save initramfs files in current work directory" echo -e " \e[1m-s\e[m Save initramfs files in current work directory"
echo echo
echo -e "Usage: \e[1m${_BASENAME} <options>\e[m" echo -e "Usage: \e[1m${_BASENAME} <options>\e[m"

View file

@ -9,6 +9,7 @@ _parameters "$@"
_root_check _root_check
_architecture_check _architecture_check
_config _config
_ISODIR="$(mktemp -d ISODIR.XXX)"
if echo "${_BASENAME}" | rg -qw 'aarch64' || echo "${_BASENAME}" | rg -qw 'x86_64'; then if echo "${_BASENAME}" | rg -qw 'aarch64' || echo "${_BASENAME}" | rg -qw 'x86_64'; then
# running system = aarch64 or x86_64 # running system = aarch64 or x86_64
echo "Starting ISO creation..." echo "Starting ISO creation..."

View file

@ -9,6 +9,7 @@ _parameters "$@"
_root_check _root_check
_architecture_check _architecture_check
_config _config
_UKIDIR="$(mktemp -d UKIDIR.XXX)"
echo "Starting UKI creation..." echo "Starting UKI creation..."
_prepare_initramfs || exit 1 _prepare_initramfs || exit 1
_systemd_ukify || exit 1 _systemd_ukify || exit 1

View file

@ -2,20 +2,17 @@
# SPDX-License-Identifier: GPL-3.0-or-later # SPDX-License-Identifier: GPL-3.0-or-later
# created by Tobias Powalowski <tpowa@archlinux.org> # created by Tobias Powalowski <tpowa@archlinux.org>
. /etc/archboot/defaults . /etc/archboot/defaults
_UKIDIR="$(mktemp -d UKIDIR.XXX)"
_usage () { _usage () {
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create ${_ARCH} UKI Image\e[m" echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create ${_ARCH} UKI Image\e[m"
echo -e "\e[1m--------------------------------------\e[m" echo -e "\e[1m----------------------------------------\e[m"
echo "This will create an Archboot UKI image." echo "Create an Archboot UKI image: <name>.efi"
echo echo
echo "Options:" echo "Options:"
echo -e " \e[1m-g\e[m Start generation of an UKI image." echo -e " \e[1m-g\e[m Start generation of an UKI image."
echo -e " \e[1m-c=CONFIG\e[m Which CONFIG should be used." echo -e " \e[1m-c=CONFIG\e[m CONFIG from ${_CONFIG_DIR}: default=${_ARCH}.conf"
echo " ${_CONFIG_DIR} includes the config files" echo -e " \e[1m-cli='options'\e[m Customize kernel commandline options"
echo " default=${_ARCH}.conf" echo -e " \e[1m-i=UKI\e[m Customize UKI image name"
echo -e " \e[1m-cli='options'\e[m Your custom kernel commandline options."
echo -e " \e[1m-i=UKI\e[m Your custom UKI image name."
echo echo
echo -e "Usage: \e[1m${_BASENAME} <options>\e[m" echo -e "Usage: \e[1m${_BASENAME} <options>\e[m"
exit 0 exit 0

View file

@ -36,6 +36,7 @@ _run_pacman() {
_update_packages() { _update_packages() {
_IGNORE=() _IGNORE=()
#shellcheck disable=SC2128
if [[ -n "${_GRAPHIC_IGNORE}" ]]; then if [[ -n "${_GRAPHIC_IGNORE}" ]]; then
#shellcheck disable=SC2068 #shellcheck disable=SC2068
for i in ${_GRAPHIC_IGNORE[@]}; do for i in ${_GRAPHIC_IGNORE[@]}; do