diff options
author | Swift Geek <swiftgeek@gmail.com> | 2017-10-29 04:46:17 +0000 |
---|---|---|
committer | Gogs <gogitservice@gmail.com> | 2017-10-29 04:46:17 +0000 |
commit | 5ff0c88449bb5bf03e4e38246565d3272fca1db5 (patch) | |
tree | e86f14dfddc867e8a8abdfa31713edcc2cf87c3d /projects | |
parent | bedc62fdada9e0e7a67b82153b186689dda07145 (diff) | |
parent | 5c1fe562d8044249f5830df826544bc72ecb41b2 (diff) | |
download | librebootfr-5ff0c88449bb5bf03e4e38246565d3272fca1db5.tar.gz librebootfr-5ff0c88449bb5bf03e4e38246565d3272fca1db5.zip |
Merge branch 'readability-changes' of kragle/libreboot into master
Diffstat (limited to 'projects')
25 files changed, 175 insertions, 175 deletions
diff --git a/projects/cbfstool/cbfstool b/projects/cbfstool/cbfstool index eafe2ba9..c665bdca 100755 --- a/projects/cbfstool/cbfstool +++ b/projects/cbfstool/cbfstool @@ -56,12 +56,12 @@ build() { project_sources_directory_missing_empty_error "$project" "$repository" "$@" - local coreboot_sources_path=$( project_sources_path "$project" "$repository" "$@" ) + local coreboot_sources_path=$(project_sources_path "$project" "$repository" "$@") local sources_path="$coreboot_sources_path/util/cbfstool/" - local build_path=$( project_build_path "$project" "$@" ) - local build_util_path=$( dirname "$build_path" ) + local build_path=$(project_build_path "$project" "$@") + local build_util_path=$(dirname "$build_path") - local vboot_sources_path=$( project_sources_path "vboot" "vboot" "devices" ) + local vboot_sources_path=$(project_sources_path "vboot" "vboot" "devices") if git_project_check "$repository" then diff --git a/projects/cbmem/cbmem b/projects/cbmem/cbmem index 6a469f61..3e240529 100755 --- a/projects/cbmem/cbmem +++ b/projects/cbmem/cbmem @@ -56,9 +56,9 @@ build() { project_sources_directory_missing_empty_error "$project" "$repository" "$@" - local coreboot_sources_path=$( project_sources_path "$project" "$repository" "$@" ) + local coreboot_sources_path=$(project_sources_path "$project" "$repository" "$@") local sources_path="$coreboot_sources_path/util/cbmem/" - local build_path=$( project_build_path "$project" "$@" ) + local build_path=$(project_build_path "$project" "$@") if git_project_check "$repository" then diff --git a/projects/coreboot/coreboot b/projects/coreboot/coreboot index f577ca26..85c1719d 100755 --- a/projects/coreboot/coreboot +++ b/projects/coreboot/coreboot @@ -64,15 +64,15 @@ build() { project_sources_directory_missing_empty_error "$project" "$repository" "$payload" "$@" - local sources_path=$( project_sources_path "$project" "$repository" "$payload" "$@" ) - local build_path=$( project_build_path "$project" "$payload" "$@" ) - local config_path=$( coreboot_config_path "$payload" "$@" ) + local sources_path=$(project_sources_path "$project" "$repository" "$payload" "$@") + local build_path=$(project_build_path "$project" "$payload" "$@") + local config_path=$(coreboot_config_path "$payload" "$@") - local arch=$( coreboot_arch "$payload" "$@" ) + local arch=$(coreboot_arch "$payload" "$@") - local crossgcc_build_path=$( project_build_path "crossgcc" "$arch" ) + local crossgcc_build_path=$(project_build_path "crossgcc" "$arch") local crossgcc_bin_path="$crossgcc_build_path/bin/" - local vboot_sources_path=$( project_sources_path "vboot" "vboot" "devices" ) + local vboot_sources_path=$(project_sources_path "vboot" "vboot" "devices") if git_project_check "$repository" then diff --git a/projects/cros-ec/cros-ec b/projects/cros-ec/cros-ec index 8fb75003..ba03bd56 100755 --- a/projects/cros-ec/cros-ec +++ b/projects/cros-ec/cros-ec @@ -63,8 +63,8 @@ build() { project_sources_directory_missing_empty_error "$project" "$repository" "$@" - local sources_path=$( project_sources_path "$project" "$repository" "$@" ) - local build_path=$( project_build_path "$project" "$@" ) + local sources_path=$(project_sources_path "$project" "$repository" "$@") + local build_path=$(project_build_path "$project" "$@") if git_project_check "$repository" then @@ -73,15 +73,15 @@ build() { mkdir -p "$build_path" - if [ "$target" = "tools" ] + if [[ "$target" = "tools" ]] then make -C "$sources_path" out="$build_path" HOST_CROSS_COMPILE= -j$TASKS "utils" else local arch="arm" - local config=$( cros_ec_config "$@" ) + local config=$(cros_ec_config "$@") - local crossgcc_bin_prefix=$( project_action_arguments "prefix" "crossgcc" "$arch" ) + local crossgcc_bin_prefix=$(project_action_arguments "prefix" "crossgcc" "$arch") make -C "$sources_path" out="$build_path" CROSS_COMPILE="$crossgcc_bin_prefix" HOST_CROSS_COMPILE= BOARD="$config" -j$TASKS fi @@ -104,7 +104,7 @@ release() { local repository=$project - if [ "$target" = "tools" ] + if [[ "$target" = "tools" ]] then project_release_install_archive "$project" "$TOOLS" "$@" else @@ -119,7 +119,7 @@ release_check() { local repository=$project - if [ "$target" = "tools" ] + if [[ "$target" = "tools" ]] then project_release_install_archive_check "$project" "$TOOLS" "$@" else 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/crossgcc/crossgcc b/projects/crossgcc/crossgcc index f0d7a5d1..46b9e3f3 100755 --- a/projects/crossgcc/crossgcc +++ b/projects/crossgcc/crossgcc @@ -46,11 +46,11 @@ extract() { crossgcc_tarballs "$@" | while read tarball do - local tarball_sources_path=$( crossgcc_tarball_sources_path "$tarball" ) - local tarball_install_path=$( crossgcc_tarball_install_path "$tarball" "$@" ) - local tarball_install_directory_path=$( dirname "$tarball_install_path" ) + local tarball_sources_path=$(crossgcc_tarball_sources_path "$tarball") + local tarball_install_path=$(crossgcc_tarball_install_path "$tarball" "$@") + local tarball_install_directory_path=$(dirname "$tarball_install_path") - if [ -f "$tarball_sources_path" ] && ! [ -f "$tarball_install_path" ] + if [[ -f "$tarball_sources_path" ]] && ! [[ -f "$tarball_install_path" ]] then printf '%s\n' "Copying source archive $tarball for $project (with ${arguments:-no argument})" @@ -70,7 +70,7 @@ extract_check() { crossgcc_tarballs "$@" | while read tarball do - local tarball_install_path=$( crossgcc_tarball_install_path "$tarball" "$@" ) + local tarball_install_path=$(crossgcc_tarball_install_path "$tarball" "$@") test ! -f "$tarball_install_path" done @@ -86,11 +86,11 @@ update() { crossgcc_tarballs "$@" | while read tarball do - local tarball_sources_path=$( crossgcc_tarball_sources_path "$tarball" ) - local tarball_install_path=$( crossgcc_tarball_install_path "$tarball" "$@" ) - local tarball_install_directory_path=$( dirname "$tarball_install_path" ) + local tarball_sources_path=$(crossgcc_tarball_sources_path "$tarball") + local tarball_install_path=$(crossgcc_tarball_install_path "$tarball" "$@") + local tarball_install_directory_path=$(dirname "$tarball_install_path") - if [ -f $tarball_sources_path ] + if [[ -f $tarball_sources_path ]] then printf '%s\n' "Copying source archive $tarball for $project (with ${arguments:-no argument})" @@ -110,7 +110,7 @@ update_check() { crossgcc_tarballs "$@" | while read tarball do - local tarball_sources_path=$( crossgcc_tarball_sources_path "$tarball" "$@" ) + local tarball_sources_path=$(crossgcc_tarball_sources_path "$tarball" "$@") test ! -f "$tarball_sources_path" done @@ -119,7 +119,7 @@ update_check() { prefix() { local arch=$1 - local build_path=$( project_build_path "$project" "$@" ) + local build_path=$(project_build_path "$project" "$@") case $arch in "arm") @@ -138,8 +138,8 @@ build() { project_sources_directory_missing_empty_error "$project" "$repository" "$@" - local sources_path=$( project_sources_path "$project" "$repository" "$@" ) - local build_path=$( project_build_path "$project" "$@" ) + local sources_path=$(project_sources_path "$project" "$repository" "$@") + local build_path=$(project_build_path "$project" "$@") if git_project_check "$repository" then @@ -184,13 +184,13 @@ release() { crossgcc_tarballs "$@" | while read tarball do - local tarball_install_path=$( crossgcc_tarball_install_path "$tarball" "$@" ) - local tarball_release_path=$( crossgcc_tarball_release_path "$tarball" "$@" ) - local release_path=$( project_release_path "$project" "$SOURCES" "$@" ) + local tarball_install_path=$(crossgcc_tarball_install_path "$tarball" "$@") + local tarball_release_path=$(crossgcc_tarball_release_path "$tarball" "$@") + local release_path=$(project_release_path "$project" "$SOURCES" "$@") mkdir -p "$release_path" - if [ -f "$tarball_install_path" ] && ! [ -f "$tarball_release_path" ] + if [[ -f "$tarball_install_path" ]] && ! [[ -f "$tarball_release_path" ]] then printf '%s\n' "Releasing source archive $tarball for $project (with ${arguments:-no argument})" @@ -210,7 +210,7 @@ release_check() { crossgcc_tarballs "$@" | while read tarball do - local tarball_release_path=$( crossgcc_tarball_release_path "$tarball" "$@" ) + local tarball_release_path=$(crossgcc_tarball_release_path "$tarball" "$@") test -f "$tarball_release_path" done diff --git a/projects/crossgcc/crossgcc-helper b/projects/crossgcc/crossgcc-helper index 3891a15c..94e445bf 100755 --- a/projects/crossgcc/crossgcc-helper +++ b/projects/crossgcc/crossgcc-helper @@ -31,9 +31,9 @@ crossgcc_same_major_version_test() { } crossgcc_tarballs() { - local sources_path=$( project_sources_path "$project" "$repository" "$@" ) + local sources_path=$(project_sources_path "$project" "$repository" "$@") local install_path="$sources_path/util/crossgcc/tarballs/" - local tarballs=$( ls "$sources_path/util/crossgcc/sum" | sed "s/.cksum$//" ) + local tarballs=$(ls "$sources_path/util/crossgcc/sum" | sed "s/.cksum$//") printf '%s\n' "$tarballs" } @@ -50,7 +50,7 @@ crossgcc_tarball_install_path() { local tarball=$1 shift - local sources_path=$( project_sources_path "$project" "$repository" "$@" ) + local sources_path=$(project_sources_path "$project" "$repository" "$@") local install_path="$sources_path/util/crossgcc/tarballs/" local tarball_install_path="$install_path/$tarball" @@ -61,7 +61,7 @@ crossgcc_tarball_release_path() { local tarball=$1 shift - local release_path=$( project_release_path "$project" "$SOURCES" "$@" ) + local release_path=$(project_release_path "$project" "$SOURCES" "$@") local tarball_release_path="$release_path/$tarball" printf '%s\n' "$tarball_release_path" diff --git a/projects/depthcharge/depthcharge b/projects/depthcharge/depthcharge index fe64c7d9..966b9689 100755 --- a/projects/depthcharge/depthcharge +++ b/projects/depthcharge/depthcharge @@ -66,15 +66,15 @@ build() { git_project_checkout "$project" "$repository" "$@" fi - local sources_path=$( project_sources_path "$project" "$repository" "$@" ) - local build_path=$( project_build_path "$project" "$@" ) + local sources_path=$(project_sources_path "$project" "$repository" "$@") + local build_path=$(project_build_path "$project" "$@") - local libpayload_build_path=$( project_build_path "libpayload" "$project" "$@" ) + local libpayload_build_path=$(project_build_path "libpayload" "$project" "$@") local libpayload_build_install_path="$libpayload_build_path/install" - local vboot_sources_path=$( project_sources_path "vboot" "vboot" "devices" ) + local vboot_sources_path=$(project_sources_path "vboot" "vboot" "devices") - local arch=$( depthcharge_arch "$@" ) - local device=$( depthcharge_device "$@" ) + local arch=$(depthcharge_arch "$@") + local device=$(depthcharge_device "$@") project_action_arguments "checkout" "vboot" "devices" diff --git a/projects/flashmap/flashmap b/projects/flashmap/flashmap index 4ac6ab70..cc1cb81b 100755 --- a/projects/flashmap/flashmap +++ b/projects/flashmap/flashmap @@ -56,8 +56,8 @@ build() { project_sources_directory_missing_empty_error "$project" "$repository" "$@" - local sources_path=$( project_sources_path "$project" "$repository" "$@" ) - local build_path=$( project_build_path "$project" "$@" ) + local sources_path=$(project_sources_path "$project" "$repository" "$@") + local build_path=$(project_build_path "$project" "$@") if git_project_check "$repository" then diff --git a/projects/flashrom-cros/flashrom-cros b/projects/flashrom-cros/flashrom-cros index 8e793fa7..a1259c2c 100755 --- a/projects/flashrom-cros/flashrom-cros +++ b/projects/flashrom-cros/flashrom-cros @@ -61,8 +61,8 @@ build() { git_project_checkout "$project" "$repository" "$@" fi - local sources_path=$( project_sources_path "$project" "$repository" "$@" ) - local build_path=$( project_build_path "$project" "$@" ) + local sources_path=$(project_sources_path "$project" "$repository" "$@") + local build_path=$(project_build_path "$project" "$@") mkdir -p "$build_path" diff --git a/projects/flashrom/flashrom b/projects/flashrom/flashrom index 0206e6b7..bc3199f0 100755 --- a/projects/flashrom/flashrom +++ b/projects/flashrom/flashrom @@ -70,8 +70,8 @@ build() { git_project_checkout "$project" "$repository" "$@" fi - local sources_path=$( project_sources_path "$project" "$repository" "$@" ) - local build_path=$( project_build_path "$project" "$@" ) + local sources_path=$(project_sources_path "$project" "$repository" "$@") + local build_path=$(project_build_path "$project" "$@") mkdir -p "$build_path" diff --git a/projects/hdctools/hdctools b/projects/hdctools/hdctools index 9a7abdf0..e30b1f7a 100755 --- a/projects/hdctools/hdctools +++ b/projects/hdctools/hdctools @@ -58,8 +58,8 @@ build() { project_sources_directory_missing_empty_error "$project" "$repository" "$@" - local sources_path=$( project_sources_path "$project" "$repository" "$@" ) - local build_path=$( project_build_path "$project" "$@" ) + local sources_path=$(project_sources_path "$project" "$repository" "$@") + local build_path=$(project_build_path "$project" "$@") if git_project_check "$repository" then diff --git a/projects/libpayload/libpayload b/projects/libpayload/libpayload index 06c239dd..4fb90eb1 100755 --- a/projects/libpayload/libpayload +++ b/projects/libpayload/libpayload @@ -34,17 +34,17 @@ build() { git_project_checkout "$repository" "$repository" "$@" fi - local coreboot_sources_path=$( project_sources_path "$repository" "$repository" "$@" ) + local coreboot_sources_path=$(project_sources_path "$repository" "$repository" "$@") local sources_path="$coreboot_sources_path/payloads/libpayload/" - local build_path=$( project_build_path "$project" "$@" ) + local build_path=$(project_build_path "$project" "$@") local build_install_path="$build_path/install" - local config_name=$( libpayload_config "$@" ) + local config_name=$(libpayload_config "$@") local config_path="$sources_path/configs/$config_name" - local arch=$( libpayload_arch "$@" ) + local arch=$(libpayload_arch "$@") - local crossgcc_build_path=$( project_build_path "crossgcc" "$arch" ) + local crossgcc_build_path=$(project_build_path "crossgcc" "$arch") local crossgcc_bin_path="$crossgcc_build_path/bin/" rm -f "$sources_path/.xcompile" 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-release/libreboot-release b/projects/libreboot-release/libreboot-release index d693f503..ed9604e1 100755 --- a/projects/libreboot-release/libreboot-release +++ b/projects/libreboot-release/libreboot-release @@ -16,7 +16,7 @@ # along with this program. If not, see <http://www.gnu.org/licenses/>. install() { - local install_path=$( project_install_path "$project" "$@" ) + local install_path=$(project_install_path "$project" "$@") project_install "$project" "$@" } 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/projects/libreboot-sources/libreboot-sources b/projects/libreboot-sources/libreboot-sources index 3dc1cb7d..bbf42315 100755 --- a/projects/libreboot-sources/libreboot-sources +++ b/projects/libreboot-sources/libreboot-sources @@ -23,7 +23,7 @@ update() { } install() { - local install_path=$( project_install_path "$project" "$@" ) + local install_path=$(project_install_path "$project" "$@") project_install "$project" "$@" } @@ -33,7 +33,7 @@ install_check() { } release() { - local archive_path=$( project_release_archive_path "$project" "$SOURCES" "$@" ) + local archive_path=$(project_release_archive_path "$project" "$SOURCES" "$@") local sources_path=$root project_release_install "$project" "$TOOLS" "$@" @@ -51,7 +51,7 @@ release() { } release_check() { - local archive_path=$( project_release_archive_path "$project" "$SOURCES" "$@" ) + local archive_path=$(project_release_archive_path "$project" "$SOURCES" "$@") project_release_install_check "$project" "$TOOLS" "$@" diff --git a/projects/mosys/mosys b/projects/mosys/mosys index 5ac27ee4..b795deb2 100755 --- a/projects/mosys/mosys +++ b/projects/mosys/mosys @@ -56,10 +56,10 @@ build() { project_sources_directory_missing_empty_error "$project" "$repository" "$@" - local sources_path=$( project_sources_path "$project" "$repository" "$@" ) - local build_path=$( project_build_path "$project" "$@" ) + local sources_path=$(project_sources_path "$project" "$repository" "$@") + local build_path=$(project_build_path "$project" "$@") - local flashmap_build_path=$( project_build_path "flashmap" "$@" ) + local flashmap_build_path=$(project_build_path "flashmap" "$@") if git_project_check "$repository" then diff --git a/projects/nvramtool/nvramtool b/projects/nvramtool/nvramtool index 70bf0758..96813239 100755 --- a/projects/nvramtool/nvramtool +++ b/projects/nvramtool/nvramtool @@ -56,9 +56,9 @@ build() { project_sources_directory_missing_empty_error "$project" "$repository" "$@" - local coreboot_sources_path=$( project_sources_path "$project" "$repository" "$@" ) + local coreboot_sources_path=$(project_sources_path "$project" "$repository" "$@") local sources_path="$coreboot_sources_path/util/nvramtool/" - local build_path=$( project_build_path "$project" "$@" ) + local build_path=$(project_build_path "$project" "$@") if git_project_check "$repository" then diff --git a/projects/vboot/vboot b/projects/vboot/vboot index a36791d6..e1216872 100755 --- a/projects/vboot/vboot +++ b/projects/vboot/vboot @@ -75,10 +75,10 @@ build() { git_project_checkout "$project" "$repository" "$@" fi - if [ "$target" = "tools" ] + if [[ "$target" = "tools" ]] then - local sources_path=$( project_sources_path "$project" "$repository" "$@" ) - local build_path=$( project_build_path "$project" "$@" ) + local sources_path=$(project_sources_path "$project" "$repository" "$@") + local build_path=$(project_build_path "$project" "$@") mkdir -p "$build_path" @@ -92,7 +92,7 @@ build() { build_check() { local target=$1 - if [ "$target" = "tools" ] + if [[ "$target" = "tools" ]] then project_build_check "$project" "$@" fi @@ -101,7 +101,7 @@ build_check() { install() { local target=$1 - if [ "$target" = "tools" ] + if [[ "$target" = "tools" ]] then project_install "$project" "$@" fi @@ -110,7 +110,7 @@ install() { install_check() { local target=$1 - if [ "$target" = "tools" ] + if [[ "$target" = "tools" ]] then project_install_check "$project" "$@" fi @@ -121,7 +121,7 @@ release() { local repository=$project - if [ "$target" = "tools" ] + if [[ "$target" = "tools" ]] then project_release_install_archive "$project" "$TOOLS" "$@" fi @@ -134,7 +134,7 @@ release_check() { local repository=$project - if [ "$target" = "tools" ] + if [[ "$target" = "tools" ]] then project_release_install_archive_check "$project" "$TOOLS" "$@" fi diff --git a/projects/vpd/vpd b/projects/vpd/vpd index f8ebe59f..1105e588 100755 --- a/projects/vpd/vpd +++ b/projects/vpd/vpd @@ -56,8 +56,8 @@ build() { project_sources_directory_missing_empty_error "$project" "$repository" "$@" - local sources_path=$( project_sources_path "$project" "$repository" "$@" ) - local build_path=$( project_build_path "$project" "$@" ) + local sources_path=$(project_sources_path "$project" "$repository" "$@") + local build_path=$(project_build_path "$project" "$@") if git_project_check "$repository" then |