aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xlibreboot50
-rwxr-xr-xlibs/common12
-rwxr-xr-xlibs/project18
-rwxr-xr-xlibs/tool12
-rwxr-xr-xprojects/cros-scripts/install/cros-boot-keys18
-rwxr-xr-xprojects/cros-scripts/install/cros-firmware-prepare44
-rwxr-xr-xprojects/cros-scripts/install/cros-kernel-install28
-rwxr-xr-xprojects/cros-scripts/install/cros-kernel-prepare26
-rwxr-xr-xprojects/cros-scripts/install/cros-medium-setup22
-rw-r--r--projects/libreboot-release/install/libreboot-release40
-rwxr-xr-xprojects/libreboot-sources/install/libreboot-sources14
-rwxr-xr-xtools/boot-keys/boot-keys6
-rwxr-xr-xtools/boot-keys/boot-keys-helper2
13 files changed, 146 insertions, 146 deletions
diff --git a/libreboot b/libreboot
index 218e09a5..dfda84b4 100755
--- a/libreboot
+++ b/libreboot
@@ -23,52 +23,52 @@ libreboot_usage() {
local action
local target
- printf '%s\n' "$executable [action] [target] [arguments]" >&2
+ printf 1>&2 '%s\n' "$executable [action] [target] [arguments]"
- printf '\n%s\n' 'Generic project actions:' >&2
+ printf 1>&2 '\n%s\n' 'Generic project actions:'
for action in "${PROJECT_ACTIONS_GENERIC[@]}"; do
- printf '%s\n' " $action" >&2
+ printf 1>&2 '%s\n' " $action"
done
- printf '\n%s\n' 'Virtual project actions:' >&2
- printf '%s\n' ' sources'
- printf '%s\n' ' produce'
- printf '%s\n' ' test'
+ printf 1>&2 '\n%s\n' 'Virtual project actions:'
+ printf 1>&2 '%s\n' ' sources'
+ printf 1>&2 '%s\n' ' produce'
+ printf 1>&2 '%s\n' ' test'
- printf '\n%s\n' 'Project targets:' >&2
+ printf 1>&2 '\n%s\n' 'Project targets:'
for target in "$root/$PROJECTS"/*; do
if project_check "$target"; then
- printf '%s\n' " $target" >&2
+ printf 1>&2 '%s\n' " $target"
fi
done
- printf '\n%s\n' 'Generic tool actions:' >&2
+ printf 1>&2 '\n%s\n' 'Generic tool actions:'
for action in "${TOOL_ACTIONS_GENERIC[@]}"; do
- printf '%s\n' " $action" >&2
+ printf 1>&2 '%s\n' " $action"
done
- printf '\n%s\n' 'Tool targets:' >&2
+ printf 1>&2 '\n%s\n' 'Tool targets:'
for target in "$root/$TOOLS"/*; do
if tool_check "$target"; then
- printf '%s\n' " $target" >&2
+ printf 1>&2 '%s\n' " $target"
fi
done
- printf '\n%s\n' 'Environment variables:' >&2
- printf '%s\n' ' PROJECTS_FORCE - Projects to always perform actions for' >&2
- printf '%s\n' ' TOOLS_FORCE - Tools to always perform actions for' >&2
- printf '%s\n' ' RELEASE_KEY - GPG key to use for release' >&2
- printf '%s\n' ' VBOOT_KEYS_PATH - Path to the vboot keys' >&2
- printf '%s\n' ' LIBFAKETIME_PATH - Path to the libfaketime shared library' >&2
- printf '%s\n' ' TASKS - Number of simultaneous tasks to run' >&2
- printf '%s\n' ' VERSION - Version string to use' >&2
-
- printf '\n%s\n' 'Configuration files:' >&2
- printf '%s\n' " $BUILD_SYSTEM.conf - Environment variables configuration" >&2
+ printf 1>&2 '\n%s\n' 'Environment variables:'
+ printf 1>&2 '%s\n' ' PROJECTS_FORCE - Projects to always perform actions for'
+ printf 1>&2 '%s\n' ' TOOLS_FORCE - Tools to always perform actions for'
+ printf 1>&2 '%s\n' ' RELEASE_KEY - GPG key to use for release'
+ printf 1>&2 '%s\n' ' VBOOT_KEYS_PATH - Path to the vboot keys'
+ printf 1>&2 '%s\n' ' LIBFAKETIME_PATH - Path to the libfaketime shared library'
+ printf 1>&2 '%s\n' ' TASKS - Number of simultaneous tasks to run'
+ printf 1>&2 '%s\n' ' VERSION - Version string to use'
+
+ printf 1>&2 '\n%s\n' 'Configuration files:'
+ printf 1>&2 '%s\n' " $BUILD_SYSTEM.conf - Environment variables configuration"
}
libreboot_project() {
@@ -82,7 +82,7 @@ libreboot_project() {
if project_action_arguments 'extract' "$project" "$@"; then
return
else
- printf '\n%s\n\n' 'Attempting to download instead...'
+ printf 1>&2 '\n%s\n\n' 'Attempting to download instead...'
project_action_arguments 'download' "$project" "$@"
fi
;;
diff --git a/libs/common b/libs/common
index fd001a5d..750886db 100755
--- a/libs/common
+++ b/libs/common
@@ -157,7 +157,7 @@ file_checksum_check() {
if ! [ -f "$checksum_path" ]
then
- printf '%s\n' 'Could not verify file checksum!' >&2
+ printf 1>&2 '%s\n' 'Could not verify file checksum!'
return 1
fi
@@ -187,7 +187,7 @@ file_signature_check() {
if ! [ -f "$signature_path" ]
then
- printf '%s\n' 'Could not verify file signature!' >&2
+ printf 1>&2 '%s\n' 'Could not verify file signature!'
return 1
fi
@@ -383,7 +383,7 @@ requirements() {
if [ -z "$requirement_path" ]
then
- printf '%s\n' "Missing requirement: $requirement" >&2
+ printf 1>&2 '%s\n' "Missing requirement: $requirement"
exit 1
fi
done
@@ -400,7 +400,7 @@ requirements_root() {
if [ -z "$requirement_path" ]
then
- printf '%s\n' "Missing requirement: $requirement" >&2
+ printf 1>&2 '%s\n' "Missing requirement: $requirement"
exit 1
fi
done
@@ -429,8 +429,8 @@ execute_root() {
local sudo=$( which sudo 2> /dev/null || true )
local arguments
- printf '%s' 'Running command as root: ' >&2
- printf '%b\n' "$*" >&2
+ printf 1>&2 '%s' 'Running command as root: '
+ printf 1>&2 '%b\n' "$*"
if ! [ -z "$sudo" ]
then
diff --git a/libs/project b/libs/project
index 37a5973c..524e6222 100755
--- a/libs/project
+++ b/libs/project
@@ -81,12 +81,12 @@ project_action() {
project_action_check "$action" "$project" "$@"
- printf '%s\n' "Project $project $action (with ${arguments:-no argument})" >&2
+ printf 1>&2 '%s\n' "Project $project $action (with ${arguments:-no argument})"
if "$action" "$@"; then
- printf '\n%s\n' "Project $project $action (with ${arguments:-no argument}) completed" >&2
+ printf 1>&2 '\n%s\n' "Project $project $action (with ${arguments:-no argument}) completed"
else
- printf '\n%s\n' "Project $project $action (with ${arguments:-no argument}) failed" >&2
+ printf 1>&2 '\n%s\n' "Project $project $action (with ${arguments:-no argument}) failed"
return 1
fi
)
@@ -171,7 +171,7 @@ project_action_arguments_verify_recursive() {
test="$(printf '%s\n' "$action_helper_arguments" | grep -e "^$argument\$" || true)"
if [[ -z "$test" ]]; then
- printf '%s\n' "Invalid argument $argument for project $project action $action" >&2
+ printf 1>&2 '%s\n' "Invalid argument $argument for project $project action $action"
return 1
fi
fi
@@ -325,7 +325,7 @@ project_sources_directory_filled_error() {
if ! [ -z "$sources_path" ]
then
- printf '%s\n' "Sources directory for project $project (with ${arguments:-no argument}) already exists" >&2
+ printf 1>&2 '%s\n' "Sources directory for project $project (with ${arguments:-no argument}) already exists"
return 1
else
return 0
@@ -341,7 +341,7 @@ project_sources_directory_missing_empty_error() {
if [ -z "$sources_path" ]
then
- printf '%s\n' "Sources directory for project $project (with ${arguments:-no argument}) missing or empty" >&2
+ printf 1>&2 '%s\n' "Sources directory for project $project (with ${arguments:-no argument}) missing or empty"
return 1
else
return 0
@@ -422,7 +422,7 @@ project_sources_archive_missing_error() {
local archive=$( project_sources_archive "$project" "$@" )
if [ -z "$archive" ] || ! [ -f "$archive" ]
then
- printf '%s\n' "Missing sources archive for $project (with ${arguments:-no argument})" >&2
+ printf 1>&2 '%s\n' "Missing sources archive for $project (with ${arguments:-no argument})"
return 1
else
return 0
@@ -804,7 +804,7 @@ project_build_directory_missing_empty_error() {
if ! directory_filled_check "$build_path"
then
- printf '%s\n' "Build directory for project $project (with ${arguments:-no argument}) missing or empty" >&2
+ printf 1>&2 '%s\n' "Build directory for project $project (with ${arguments:-no argument}) missing or empty"
return 1
else
return 0
@@ -1010,7 +1010,7 @@ project_install_directory_missing_empty_error() {
if ! directory_filled_check "$install_path"
then
- printf '%s\n' "Install directory for project $project (with ${arguments:-no argument}) missing or empty" >&2
+ printf 1>&2 '%s\n' "Install directory for project $project (with ${arguments:-no argument}) missing or empty"
return 1
else
return 0
diff --git a/libs/tool b/libs/tool
index 8ed70e18..41bf0cc1 100755
--- a/libs/tool
+++ b/libs/tool
@@ -79,7 +79,7 @@ tool_action() {
if ! tool_check "$tool"
then
- printf '%s\n' "Tool $tool check failed" >&2
+ printf 1>&2 '%s\n' "Tool $tool check failed"
return 1
fi
@@ -97,7 +97,7 @@ tool_action() {
return 0
fi
- printf '%s\n' "Tool $tool $action (with ${arguments:-no argument})" >&2
+ printf 1>&2 '%s\n' "Tool $tool $action (with ${arguments:-no argument})"
(
set -e
@@ -106,10 +106,10 @@ tool_action() {
if [ $? -ne 0 ]
then
- printf '\n%s\n' "Tool $tool $action (with ${arguments:-no argument}) failed" >&2
+ printf 1>&2 '\n%s\n' "Tool $tool $action (with ${arguments:-no argument}) failed"
return 1
else
- printf '\n%s\n' "Tool $tool $action (with ${arguments:-no argument}) completed" >&2
+ printf 1>&2 '\n%s\n' "Tool $tool $action (with ${arguments:-no argument}) completed"
fi
)
}
@@ -125,7 +125,7 @@ tool_action_check() {
if ! tool_check "$tool"
then
- printf '%s\n' "Tool $tool check failed" >&2
+ printf 1>&2 '%s\n' "Tool $tool check failed"
return 1
fi
@@ -162,7 +162,7 @@ tool_action_helper() {
if ! tool_check "$tool"
then
- printf '%s\n' "Tool $tool check failed" >&2
+ printf 1>&2 '%s\n' "Tool $tool check failed"
return 1
fi
diff --git a/projects/cros-scripts/install/cros-boot-keys b/projects/cros-scripts/install/cros-boot-keys
index 28b25175..53db579f 100755
--- a/projects/cros-scripts/install/cros-boot-keys
+++ b/projects/cros-scripts/install/cros-boot-keys
@@ -31,16 +31,16 @@ ALGORITHMS="7 7 11 7 7 4 11 11 11"
MODES="7 7 11 7 10"
usage() {
- printf '%s\n' "$executable [action]" >&2
+ printf 1>&2 '%s\n' "$executable [action]"
- printf '\n%s\n' 'Actions:' >&2
- printf '%s\n' ' generate - Generate a set of keys' >&2
- printf '%s\n' ' verify - Verify keyblocks' >&2
+ printf 1>&2 '\n%s\n' 'Actions:'
+ printf 1>&2 '%s\n' ' generate - Generate a set of keys'
+ printf 1>&2 '%s\n' ' verify - Verify keyblocks'
- printf '\n%s\n' 'Environment variables:' >&2
- printf '%s\n' ' KEYS_VERSION - Version to give the keys' >&2
- printf '%s\n' ' VBOOT_KEYS_PATH - Path to the vboot keys' >&2
- printf '%s\n' ' VBOOT_TOOLS_PATH - Path to vboot tools' >&2
+ printf 1>&2 '\n%s\n' 'Environment variables:'
+ printf 1>&2 '%s\n' ' KEYS_VERSION - Version to give the keys'
+ printf 1>&2 '%s\n' ' VBOOT_KEYS_PATH - Path to the vboot keys'
+ printf 1>&2 '%s\n' ' VBOOT_TOOLS_PATH - Path to vboot tools'
}
keys_override_confirm() {
@@ -151,7 +151,7 @@ requirements() {
if [ -z "$requirement_path" ]
then
- printf '%s\n' "Missing requirement: $requirement" >&2
+ printf 1>&2 '%s\n' "Missing requirement: $requirement"
exit 1
fi
done
diff --git a/projects/cros-scripts/install/cros-firmware-prepare b/projects/cros-scripts/install/cros-firmware-prepare
index 52deadf5..8fceffb4 100755
--- a/projects/cros-scripts/install/cros-firmware-prepare
+++ b/projects/cros-scripts/install/cros-firmware-prepare
@@ -22,34 +22,34 @@ VBPUBK="vbpubk"
GBB_FLAGS="dev_screen_short_delay load_option_roms enable_alternate_os force_dev_switch_on force_dev_boot_usb disable_fw_rollback_check enter_triggers_tonorm force_dev_boot_legacy faft_key_overide disable_ec_software_sync default_dev_boot_lefacy disable_pd_software_sync disable_lid_shutdown dev_boot_fastboot_full_cap enable_serial"
usage() {
- printf '%s\n' "$executable [action] [firmware image] [gbb action|vpd action] [gbb file|gbb flag|vpd file]" >&2
+ printf 1>&2 '%s\n' "$executable [action] [firmware image] [gbb action|vpd action] [gbb file|gbb flag|vpd file]"
- printf '\n%s\n' 'Actions:' >&2
- printf '%s\n' ' sign - Sign firmware image' >&2
- printf '%s\n' ' verify - Verify firmware image' >&2
- printf '%s\n' ' gbb - Google Binary Block' >&2
+ printf 1>&2 '\n%s\n' 'Actions:'
+ printf 1>&2 '%s\n' ' sign - Sign firmware image'
+ printf 1>&2 '%s\n' ' verify - Verify firmware image'
+ printf 1>&2 '%s\n' ' gbb - Google Binary Block'
- printf '\n%s\n' 'GBB actions:' >&2
- printf '%s\n' ' extract - Extract GBB from firmware image to path' >&2
- printf '%s\n' ' replace - Replace GBB from path to firmware image' >&2
- printf '%s\n' ' list - List enabled GBB flags' >&2
- printf '%s\n' ' enable - Enable GBB flag' >&2
- printf '%s\n' ' disable - Disable GBB flag' >&2
+ printf 1>&2 '\n%s\n' 'GBB actions:'
+ printf 1>&2 '%s\n' ' extract - Extract GBB from firmware image to path'
+ printf 1>&2 '%s\n' ' replace - Replace GBB from path to firmware image'
+ printf 1>&2 '%s\n' ' list - List enabled GBB flags'
+ printf 1>&2 '%s\n' ' enable - Enable GBB flag'
+ printf 1>&2 '%s\n' ' disable - Disable GBB flag'
- printf '\n%s\n' 'GBB flags:' >&2
+ printf 1>&2 '\n%s\n' 'GBB flags:'
for flag in $GBB_FLAGS
do
- printf '%s\n' " $flag" >&2
+ printf 1>&2 '%s\n' " $flag"
done
- printf '\n%s\n' 'VPD actions:' >&2
- printf '%s\n' ' extract - Extract VPD from firmware image to path' >&2
- printf '%s\n' ' replace - Replace VPD from path to firmware image' >&2
+ printf 1>&2 '\n%s\n' 'VPD actions:'
+ printf 1>&2 '%s\n' ' extract - Extract VPD from firmware image to path'
+ printf 1>&2 '%s\n' ' replace - Replace VPD from path to firmware image'
- printf '\n%s\n' 'Environment variables:' >&2
- printf '%s\n' ' VBOOT_KEYS_PATH - Path to the vboot keys' >&2
- printf '%s\n' ' VBOOT_TOOLS_PATH - Path to vboot tools' >&2
+ printf 1>&2 '\n%s\n' 'Environment variables:'
+ printf 1>&2 '%s\n' ' VBOOT_KEYS_PATH - Path to the vboot keys'
+ printf 1>&2 '%s\n' ' VBOOT_TOOLS_PATH - Path to vboot tools'
}
sign() {
@@ -134,7 +134,7 @@ gbb() {
if [ -z "$flag_value" ]
then
- printf '%s\n' "Invalid GBB flag: $gbb_flag" >&2
+ printf 1>&2 '%s\n' "Invalid GBB flag: $gbb_flag"
exit 1
fi
@@ -156,7 +156,7 @@ gbb() {
if [ -z "$flag_value" ]
then
- printf '%s\n' "Invalid GBB flag: $gbb_flag" >&2
+ printf 1>&2 '%s\n' "Invalid GBB flag: $gbb_flag"
exit 1
fi
@@ -237,7 +237,7 @@ requirements() {
if [ -z "$requirement_path" ]
then
- printf '%s\n' "Missing requirement: $requirement" >&2
+ printf 1>&2 '%s\n' "Missing requirement: $requirement"
exit 1
fi
done
diff --git a/projects/cros-scripts/install/cros-kernel-install b/projects/cros-scripts/install/cros-kernel-install
index 7333b3fa..8f6c69e9 100755
--- a/projects/cros-scripts/install/cros-kernel-install
+++ b/projects/cros-scripts/install/cros-kernel-install
@@ -23,22 +23,22 @@ MODEL="model"
NAME="name"
usage() {
- printf '%s\n' "$executable [action] [storage] [kernel image|kernel modules]" >&2
+ printf 1>&2 '%s\n' "$executable [action] [storage] [kernel image|kernel modules]"
- printf '\n%s\n' 'Actions:' >&2
- printf '%s\n' ' backup - Backup kernel image' >&2
- printf '%s\n' ' image - Install kernel image' >&2
- printf '%s\n' ' modules - Install kernel modules' >&2
+ printf 1>&2 '\n%s\n' 'Actions:'
+ printf 1>&2 '%s\n' ' backup - Backup kernel image'
+ printf 1>&2 '%s\n' ' image - Install kernel image'
+ printf 1>&2 '%s\n' ' modules - Install kernel modules'
usage_storage
- printf '\n%s\n' 'Environment variables:' >&2
- printf '%s\n' ' VBOOT_KEYS_PATH - Path to the vboot keys' >&2
- printf '%s\n' ' VBOOT_TOOLS_PATH - Path to vboot tools' >&2
+ printf 1>&2 '\n%s\n' 'Environment variables:'
+ printf 1>&2 '%s\n' ' VBOOT_KEYS_PATH - Path to the vboot keys'
+ printf 1>&2 '%s\n' ' VBOOT_TOOLS_PATH - Path to vboot tools'
}
usage_storage() {
- printf '\n%s\n' 'Storage:' >&2
+ printf 1>&2 '\n%s\n' 'Storage:'
local nodes=$( ls "$SYS_BLOCK_PATH" )
local node_path
@@ -58,7 +58,7 @@ usage_storage() {
continue
fi
- printf '%s\n' " $node_path - $name" >&2
+ printf 1>&2 '%s\n' " $node_path - $name"
done
}
@@ -155,7 +155,7 @@ backup() {
if [ -z "$storage_kernel_path" ]
then
- printf '%s\n' "No kernel partition found on storage $storage_path" >&2
+ printf 1>&2 '%s\n' "No kernel partition found on storage $storage_path"
return 1
fi
@@ -172,7 +172,7 @@ image() {
if [ -z "$storage_kernel_path" ]
then
- printf '%s\n' "No kernel partition found on storage $storage_path" >&2
+ printf 1>&2 '%s\n' "No kernel partition found on storage $storage_path"
return 1
fi
@@ -192,7 +192,7 @@ modules() {
if [ -z "$storage_rootfs_path" ]
then
- printf '%s\n' "No rootfs partition found on storage $storage_path" >&2
+ printf 1>&2 '%s\n' "No rootfs partition found on storage $storage_path"
return 1
fi
@@ -221,7 +221,7 @@ requirements() {
if [ -z "$requirement_path" ]
then
- printf '%s\n' "Missing requirement: $requirement" >&2
+ printf 1>&2 '%s\n' "Missing requirement: $requirement"
exit 1
fi
done
diff --git a/projects/cros-scripts/install/cros-kernel-prepare b/projects/cros-scripts/install/cros-kernel-prepare
index 047bb5c1..8dd5c797 100755
--- a/projects/cros-scripts/install/cros-kernel-prepare
+++ b/projects/cros-scripts/install/cros-kernel-prepare
@@ -27,21 +27,21 @@ FIT="fit"
IMG="img"
usage() {
- printf '%s\n' "$executable [action] [kernel files|kernel image] [medium]" >&2
+ printf 1>&2 '%s\n' "$executable [action] [kernel files|kernel image] [medium]"
- printf '\n%s\n' 'Actions:' >&2
- printf '%s\n' ' pack - Pack kernel files to a medium-specific image' >&2
- printf '%s\n' ' sign - Sign kernel image' >&2
- printf '%s\n' ' verify - Very kernel image signatures' >&2
+ printf 1>&2 '\n%s\n' 'Actions:'
+ printf 1>&2 '%s\n' ' pack - Pack kernel files to a medium-specific image'
+ printf 1>&2 '%s\n' ' sign - Sign kernel image'
+ printf 1>&2 '%s\n' ' verify - Very kernel image signatures'
- printf '\n%s\n' 'Medium:' >&2
- printf '%s\n' ' usb - External USB storage' >&2
- printf '%s\n' ' mmc - External SD card storage' >&2
- printf '%s\n' ' emmc - Internal storage' >&2
+ printf 1>&2 '\n%s\n' 'Medium:'
+ printf 1>&2 '%s\n' ' usb - External USB storage'
+ printf 1>&2 '%s\n' ' mmc - External SD card storage'
+ printf 1>&2 '%s\n' ' emmc - Internal storage'
- printf '\n%s\n' 'Environment variables:' >&2
- printf '%s\n' ' VBOOT_KEYS_PATH - Path to the vboot keys' >&2
- printf '%s\n' ' VBOOT_TOOLS_PATH - Path to vboot tools' >&2
+ printf 1>&2 '\n%s\n' 'Environment variables:'
+ printf 1>&2 '%s\n' ' VBOOT_KEYS_PATH - Path to the vboot keys'
+ printf 1>&2 '%s\n' ' VBOOT_TOOLS_PATH - Path to vboot tools'
}
pack() {
@@ -88,7 +88,7 @@ requirements() {
if [ -z "$requirement_path" ]
then
- printf '%s\n' "Missing requirement: $requirement" >&2
+ printf 1>&2 '%s\n' "Missing requirement: $requirement"
exit 1
fi
done
diff --git a/projects/cros-scripts/install/cros-medium-setup b/projects/cros-scripts/install/cros-medium-setup
index 2b278a9d..6295e0ec 100755
--- a/projects/cros-scripts/install/cros-medium-setup
+++ b/projects/cros-scripts/install/cros-medium-setup
@@ -32,22 +32,22 @@ GPT_SIZE=34
KERNEL_SIZE=16384
usage() {
- printf '%s\n' "$executable [action] [storage] [rootfs tarball|kernel files] [medium]" >&2
+ printf 1>&2 '%s\n' "$executable [action] [storage] [rootfs tarball|kernel files] [medium]"
- printf '\n%s\n' 'Actions:' >&2
- printf '%s\n' ' partitions - Setup partitions on storage' >&2
- printf '%s\n' ' rootfs - Install rootfs tarball to storage' >&2
- printf '%s\n' ' kernel - Install kernel files to storage' >&2
+ printf 1>&2 '\n%s\n' 'Actions:'
+ printf 1>&2 '%s\n' ' partitions - Setup partitions on storage'
+ printf 1>&2 '%s\n' ' rootfs - Install rootfs tarball to storage'
+ printf 1>&2 '%s\n' ' kernel - Install kernel files to storage'
usage_storage
- printf '\n%s\n' 'Environment variables:' >&2
- printf '%s\n' ' KERNEL_PATH - Path to the kernel image' >&2
- printf '%s\n' ' VBOOT_TOOLS_PATH - Path to vboot tools' >&2
+ printf 1>&2 '\n%s\n' 'Environment variables:'
+ printf 1>&2 '%s\n' ' KERNEL_PATH - Path to the kernel image'
+ printf 1>&2 '%s\n' ' VBOOT_TOOLS_PATH - Path to vboot tools'
}
usage_storage() {
- printf '\n%s\n' 'Storage:' >&2
+ printf 1>&2 '\n%s\n' 'Storage:'
local nodes=$( ls "$SYS_BLOCK_PATH" )
local node_path
@@ -67,7 +67,7 @@ usage_storage() {
continue
fi
- printf '%s\n' " $node_path - $name" >&2
+ printf 1>&2 '%s\n' " $node_path - $name"
done
}
@@ -243,7 +243,7 @@ requirements() {
if [ -z "$requirement_path" ]
then
- printf '%s\n' "Missing requirement: $requirement" >&2
+ printf 1>&2 '%s\n' "Missing requirement: $requirement"
exit 1
fi
done
diff --git a/projects/libreboot-release/install/libreboot-release b/projects/libreboot-release/install/libreboot-release
index 08c4d64b..469d4db4 100644
--- a/projects/libreboot-release/install/libreboot-release
+++ b/projects/libreboot-release/install/libreboot-release
@@ -27,18 +27,18 @@ CHECKSUM="sha256sum"
ASC="asc"
usage() {
- printf '%s\n' "$executable [action] [projects...]" >&2
-
- printf '\n%s\n' 'Actions:' >&2
- printf '%s\n' ' download - Download project files' >&2
- printf '%s\n' ' sources - Download project sources' >&2
- printf '%s\n' ' verify - Verify project files' >&2
- printf '%s\n' ' extract - Extract project files' >&2
- printf '%s\n' ' prepare - Download, verify and extract project files' >&2
-
- printf '\n%s\n' 'Environment variables:' >&2
- printf '%s\n' ' MACHINE - Machine architecture to use' >&2
- printf '%s\n' ' DOWNLOAD_URL - Base URL to download files from' >&2
+ printf 1>&2 '%s\n' "$executable [action] [projects...]"
+
+ printf 1>&2 '\n%s\n' 'Actions:'
+ printf 1>&2 '%s\n' ' download - Download project files'
+ printf 1>&2 '%s\n' ' sources - Download project sources'
+ printf 1>&2 '%s\n' ' verify - Verify project files'
+ printf 1>&2 '%s\n' ' extract - Extract project files'
+ printf 1>&2 '%s\n' ' prepare - Download, verify and extract project files'
+
+ printf 1>&2 '\n%s\n' 'Environment variables:'
+ printf 1>&2 '%s\n' ' MACHINE - Machine architecture to use'
+ printf 1>&2 '%s\n' ' DOWNLOAD_URL - Base URL to download files from'
}
download() {
@@ -85,7 +85,7 @@ download() {
IFS=$ifs_save
done
- printf '%s\n' "Could not download $project from $DOWNLOAD_URL" >&2
+ printf 1>&2 '%s\n' "Could not download $project from $DOWNLOAD_URL"
return 1
}
@@ -104,7 +104,7 @@ sources() {
printf '\n%s\n' "Downloaded $project sources"
else
- printf '%s\n' "Could not download $project sources from $DOWNLOAD_URL" >&2
+ printf 1>&2 '%s\n' "Could not download $project sources from $DOWNLOAD_URL"
return 1
fi
@@ -153,14 +153,14 @@ verify() {
sha256sum -c "$project.$ARCHIVE.$CHECKSUM"
)
else
- printf '%s\n' "Could not verify $project checksum!" >&2
+ printf 1>&2 '%s\n' "Could not verify $project checksum!"
fi
if [ -f "$signature_path" ]
then
gpg --armor --verify "$signature_path" "$path"
else
- printf '%s\n' "Could not verify $project signature!" >&2
+ printf 1>&2 '%s\n' "Could not verify $project signature!"
fi
printf '\n%s\n' "Verified $project"
@@ -171,7 +171,7 @@ verify() {
IFS=$ifs_save
done
- printf '%s\n' "Could not verify $project" >&2
+ printf 1>&2 '%s\n' "Could not verify $project"
return 1
}
@@ -225,7 +225,7 @@ extract() {
IFS=$ifs_save
done
- printf '%s\n' "Could not extract $project" >&2
+ printf 1>&2 '%s\n' "Could not extract $project"
return 1
}
@@ -239,7 +239,7 @@ requirements() {
if [ -z "$requirement_path" ]
then
- printf '%s\n' "Missing requirement: $requirement" >&2
+ printf 1>&2 '%s\n' "Missing requirement: $requirement"
exit 1
fi
done
@@ -256,7 +256,7 @@ setup() {
if [ -z "$DOWNLOAD_URL" ]
then
- printf '%s\n' 'Missing download URL' >&2
+ printf 1>&2 '%s\n' 'Missing download URL'
exit 1
fi
}
diff --git a/projects/libreboot-sources/install/libreboot-sources b/projects/libreboot-sources/install/libreboot-sources
index d836054d..162aef32 100755
--- a/projects/libreboot-sources/install/libreboot-sources
+++ b/projects/libreboot-sources/install/libreboot-sources
@@ -21,12 +21,12 @@ SOURCES="sources"
ARCHIVE="tar.xz"
usage() {
- printf '%s\n' "$executable [action] [sources path] (extract path)" >&2
+ printf 1>&2 '%s\n' "$executable [action] [sources path] (extract path)"
- printf '\n%s\n' 'Actions:' >&2
- printf '%s\n' ' extract - Extract build system sources' >&2
- printf '%s\n' ' copy - Copy projects sources' >&2
- printf '%s\n' ' prepare - Extract and copy sources' >&2
+ printf 1>&2 '\n%s\n' 'Actions:'
+ printf 1>&2 '%s\n' ' extract - Extract build system sources'
+ printf 1>&2 '%s\n' ' copy - Copy projects sources'
+ printf 1>&2 '%s\n' ' prepare - Extract and copy sources'
printf '\n%s\n' ' When no extract path is provided, sources are extracted in the current'
printf '%s\n' ' directory.'
@@ -49,7 +49,7 @@ extract() {
archive=$( find $sources_path -name "$BUILD_SYSTEM-sources.$ARCHIVE" || true )
if [ -z "$archive" ]
then
- printf '%s\n' "Finding $BUILD_SYSTEM sources archive failed!" >&2
+ printf 1>&2 '%s\n' "Finding $BUILD_SYSTEM sources archive failed!"
usage
exit 1
fi
@@ -96,7 +96,7 @@ requirements() {
if [ -z "$requirement_path" ]
then
- printf '%s\n' "Missing requirement: $requirement" >&2
+ printf 1>&2 '%s\n' "Missing requirement: $requirement"
exit 1
fi
done
diff --git a/tools/boot-keys/boot-keys b/tools/boot-keys/boot-keys
index da56aca9..a556aa41 100755
--- a/tools/boot-keys/boot-keys
+++ b/tools/boot-keys/boot-keys
@@ -24,7 +24,7 @@ generate() {
if [ -z "$type" ]
then
- printf '%s\n' 'Unable to determine keys type' >&2
+ printf 1>&2 '%s\n' 'Unable to determine keys type'
return 1
fi
@@ -47,7 +47,7 @@ sign() {
if [ -z "$type" ]
then
- printf '%s\n' 'Unable to determine keys type' >&2
+ printf 1>&2 '%s\n' 'Unable to determine keys type'
return 1
fi
@@ -90,7 +90,7 @@ verify() {
if [ -z "$type" ]
then
- printf '%s\n' 'Unable to determine keys type' >&2
+ printf 1>&2 '%s\n' 'Unable to determine keys type'
return 1
fi
diff --git a/tools/boot-keys/boot-keys-helper b/tools/boot-keys/boot-keys-helper
index 31e2c16b..5d01916a 100755
--- a/tools/boot-keys/boot-keys-helper
+++ b/tools/boot-keys/boot-keys-helper
@@ -15,7 +15,7 @@ boot_keys_cros() {
if ! [ -x "$cros_script_path" ]
then
- printf '%s' "$cros_script script missing from cros-scripts install" >&2
+ printf 1>&2 '%s' "$cros_script script missing from cros-scripts install"
return 1
fi