mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 03:20:38 +02:00
refactor messages, don't create tempdirs on options listing
This commit is contained in:
parent
f9c0852d02
commit
74efa02b7d
4 changed files with 12 additions and 16 deletions
|
@ -2,20 +2,17 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||
. /etc/archboot/defaults
|
||||
_ISODIR="$(mktemp -d ISODIR.XXX)"
|
||||
_BOOTLOADER="/usr/share/archboot/bootloader"
|
||||
|
||||
_usage () {
|
||||
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create ${_ARCH} ISO Image\e[m"
|
||||
echo -e "\e[1m--------------------------------------\e[m"
|
||||
echo "This will create an Archboot ISO image."
|
||||
echo -e "\e[1m----------------------------------------\e[m"
|
||||
echo "Create an Archboot ISO image: <name>.iso"
|
||||
echo
|
||||
echo "Options:"
|
||||
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 " ${_CONFIG_DIR} includes the config files"
|
||||
echo " default=${_ARCH}.conf"
|
||||
echo -e " \e[1m-i=ISO\e[m Your custom ISO name."
|
||||
echo -e " \e[1m-g\e[m Start generation of an ISO image"
|
||||
echo -e " \e[1m-c=CONFIG\e[m CONFIG from ${_CONFIG_DIR}: default=${_ARCH}.conf"
|
||||
echo -e " \e[1m-i=ISO\e[m Customize ISO name"
|
||||
echo -e " \e[1m-s\e[m Save initramfs files in current work directory"
|
||||
echo
|
||||
echo -e "Usage: \e[1m${_BASENAME} <options>\e[m"
|
||||
|
|
|
@ -9,6 +9,7 @@ _parameters "$@"
|
|||
_root_check
|
||||
_architecture_check
|
||||
_config
|
||||
_ISODIR="$(mktemp -d ISODIR.XXX)"
|
||||
if echo "${_BASENAME}" | rg -qw 'aarch64' || echo "${_BASENAME}" | rg -qw 'x86_64'; then
|
||||
# running system = aarch64 or x86_64
|
||||
echo "Starting ISO creation..."
|
||||
|
|
|
@ -9,6 +9,7 @@ _parameters "$@"
|
|||
_root_check
|
||||
_architecture_check
|
||||
_config
|
||||
_UKIDIR="$(mktemp -d UKIDIR.XXX)"
|
||||
echo "Starting UKI creation..."
|
||||
_prepare_initramfs || exit 1
|
||||
_systemd_ukify || exit 1
|
||||
|
|
|
@ -2,20 +2,17 @@
|
|||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
# created by Tobias Powalowski <tpowa@archlinux.org>
|
||||
. /etc/archboot/defaults
|
||||
_UKIDIR="$(mktemp -d UKIDIR.XXX)"
|
||||
|
||||
_usage () {
|
||||
echo -e "\e[1m\e[36mArchboot\e[m\e[1m - Create ${_ARCH} UKI Image\e[m"
|
||||
echo -e "\e[1m--------------------------------------\e[m"
|
||||
echo "This will create an Archboot UKI image."
|
||||
echo -e "\e[1m----------------------------------------\e[m"
|
||||
echo "Create an Archboot UKI image: <name>.efi"
|
||||
echo
|
||||
echo "Options:"
|
||||
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 " ${_CONFIG_DIR} includes the config files"
|
||||
echo " default=${_ARCH}.conf"
|
||||
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 -e " \e[1m-c=CONFIG\e[m CONFIG from ${_CONFIG_DIR}: default=${_ARCH}.conf"
|
||||
echo -e " \e[1m-cli='options'\e[m Customize kernel commandline options"
|
||||
echo -e " \e[1m-i=UKI\e[m Customize UKI image name"
|
||||
echo
|
||||
echo -e "Usage: \e[1m${_BASENAME} <options>\e[m"
|
||||
exit 0
|
||||
|
|
Loading…
Reference in a new issue