diff options
author | Libreboot Contributor <contributor@libreboot.org> | 2020-03-18 17:20:14 +0100 |
---|---|---|
committer | Libreboot Contributor <contributor@libreboot.org> | 2020-03-18 17:20:27 +0100 |
commit | 0f6ea1c9e0a25a9b7546f96f27cef8841f0d09b5 (patch) | |
tree | a28b9403123dd6204eb2dd8cb44eada12c169f4b /i18n/fr_FR/tools/boot-keys/boot-keys-helper | |
parent | 6e5bdd1271059a9c61c80b21001fd3d14ff25045 (diff) | |
download | librebootfr-0f6ea1c9e0a25a9b7546f96f27cef8841f0d09b5.tar.gz librebootfr-0f6ea1c9e0a25a9b7546f96f27cef8841f0d09b5.zip |
Creation of i18n folder containing translations of the libreboot project. Added french one, not finished.
Diffstat (limited to 'i18n/fr_FR/tools/boot-keys/boot-keys-helper')
-rwxr-xr-x | i18n/fr_FR/tools/boot-keys/boot-keys-helper | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/i18n/fr_FR/tools/boot-keys/boot-keys-helper b/i18n/fr_FR/tools/boot-keys/boot-keys-helper new file mode 100755 index 00000000..464638b9 --- /dev/null +++ b/i18n/fr_FR/tools/boot-keys/boot-keys-helper @@ -0,0 +1,72 @@ +#!/usr/bin/env bash + +KERNEL="kernel" +TYPE="type" +ROM="rom" +IMG="img" + +boot_keys_cros() { + local cros_script=$1 + shift + + local vboot_tools_path=$(project_install_path "vboot" "tools") + local cros_scripts_path=$(project_install_path "cros-scripts") + local cros_script_path="$cros_scripts_path/$cros_script" + + if ! [[ -x "$cros_script_path" ]] + then + printf 1>&2 '%s' "$cros_script script missing from cros-scripts install" + return 1 + fi + + VBOOT_KEYS_PATH=$VBOOT_KEYS_PATH VBOOT_TOOLS_PATH=$vboot_tools_path $cros_script_path "$@" +} + +boot_keys_type() { + tool_file_contents "$tool" "$CONFIGS" "$TYPE" "$@" +} + +boot_keys_files_install_path() { + local project=$1 + shift + + local helper_arguments + local argument + local ifs_save + + helper_arguments=$(project_action_helper "arguments" "$project" "$@") + + + if [[ $? -ne 0 ]] || [[ -z "$helper_arguments" ]] + then + project_install_path "$project" "$@" + else + # This it to allow space characters in arguments. + ifs_save=$IFS + IFS=$'\n' + + for argument in $(printf '%s\n' "$helper_arguments") + do + ( + IFS=$ifs_save + + # Only a single argument at a time is returned by the helper. + boot_keys_files_install_path "$project" "$@" "$argument" + ) + done + + IFS=$ifs_save + fi +} + +boot_keys_files() { + local project=$1 + shift + + local cros_scripts_path=$(project_install_path "cros-scripts") + local cros_boot_keys="$cros_scripts_path/cros-boot-keys" + + project_action_arguments_verify_recursive "install" "$project" "$@" + + boot_keys_files_install_path "$project" "$@" +} |