From d90184a7f06c277b0749833c1690a31abfdca2fd Mon Sep 17 00:00:00 2001 From: David Runge Date: Mon, 24 Aug 2020 17:53:10 +0200 Subject: Pass profile directory as parameter to mkarchiso **archiso/mkarchiso**: Change all override option parameters (i.e. `-A`, `-C`, `-D`, `-L`, `-P` and `-g`) to not directly override the global variable they are tied to, but instead using an `override_` prefixed variable. Add `_set_overrides()` to use `override_` prefixed variables (if set) to override those without a prefix. Remove `-B` (a profile directory) from the list of parameters. The profile directory is now provided as separate non-option parameter. Add a call to `_read_profile()`, `_set_overrides()` and `command_build_profile()` to the fallthrough option of the switch-case checking `command_name` - a non-option parameter to mkarchiso. This effectively provides the possibility to set the profile directory using a non-option parameter, while still maintaining compatibility to legacy named arguments used in the configs' `build.sh` scripts. Extend the warning in regards to legacy `build.sh` based commands to mkarchiso by providing an EOL with archiso v49. Change the help output to reflect the changes and further elaborate on the legacy commands used by `build.sh` scripts. Change help output to be ordered alphabetically. Add help output for `-r` and `-g` options. Call `_set_overrides()` for legacy commands that accept one or more of the overriden options (i.e. `command_init`, `command_install`, `command_prepare` and `command_iso`). Various style fixes. **configs/{baseline,releng}/build.sh**: Change call to mkarchiso to use the profile's directory as a named argument instead of an option-argument. **README.rst**: Fix documentation on how to call mkarchiso with a profile directory. Fix wording and ordering of option arguments for run_archiso documentation. Fixes #52 --- archiso/mkarchiso | 150 +++++++++++++++++++++++++++++++++++------------------- 1 file changed, 98 insertions(+), 52 deletions(-) (limited to 'archiso') diff --git a/archiso/mkarchiso b/archiso/mkarchiso index 2ccf7f0..0318aa6 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -20,17 +20,22 @@ img_name="${app_name}.iso" sfs_mode="sfs" sfs_comp="xz" gpg_key="" +override_gpg_key="" # profile defaults profile="" iso_name="${app_name}" iso_label="${app_name^^}" +override_iso_label="" iso_publisher="${app_name}" +override_iso_publisher="" iso_application="${app_name} iso" +override_iso_application="" iso_version="" install_dir="${app_name}" arch="$(uname -m)" pacman_conf="/etc/pacman.conf" +override_pacman_conf="" bootmodes=() @@ -105,36 +110,52 @@ _umount_efibootimg() { # $1: exit status number. _usage() { IFS='' read -r -d '' usagetext < - general options: - -B Directory of the archiso profile to build - -p PACKAGE(S) Package(s) to install, can be used multiple times - -C pacman configuration file. - Default: '${pacman_conf}' - -L