From 6b28de15fe4d53d93207f0e392680f75c3f6aced Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sat, 8 Oct 2022 13:17:42 +0200 Subject: [PATCH] run `shellfmt` on all of `extensions` --- extensions/detect-unused-extensions.sh | 4 +-- extensions/flash-kernel.sh | 38 +++++++++++----------- extensions/gen-sample-extension-docs.sh | 28 ++++++++--------- extensions/grub.sh | 42 ++++++++++++------------- extensions/marvell-tools.sh | 2 +- extensions/nvidia.sh | 2 +- extensions/rkbin-tools.sh | 4 +-- extensions/sunxi-tools.sh | 10 +++--- 8 files changed, 65 insertions(+), 65 deletions(-) diff --git a/extensions/detect-unused-extensions.sh b/extensions/detect-unused-extensions.sh index 482770d30..9d0e7efb8 100644 --- a/extensions/detect-unused-extensions.sh +++ b/extensions/detect-unused-extensions.sh @@ -26,7 +26,7 @@ function extension_metadata_ready__999_detect_wishful_hooking() { stack="$(get_extension_hook_stracktrace "${source_info}" "${line_info}")" if [[ "$source_info" != "" ]]; then # log to debug log. it's reassuring. - echo "\$\$\$ Hook function stacktrace for '${one_defined_function}': '${stack}' (${defined_info})" >>"${EXTENSION_MANAGER_LOG_FILE}" + echo "\$\$\$ Hook function stacktrace for '${one_defined_function}': '${stack}' (${defined_info})" >> "${EXTENSION_MANAGER_LOG_FILE}" if [[ "${LOG_ALL_HOOK_TRACES}" != "no" ]]; then display_alert "Hook function stacktrace for '${one_defined_function}'" "${stack}" "${LOG_ALL_HOOK_TRACES}" fi @@ -39,7 +39,7 @@ function extension_metadata_ready__999_detect_wishful_hooking() { found_honeypot_function=1 else # unexpected wishful hooking. Log and wrn the user. - echo "\$\$\$ Wishful hooking detected" "Function '${one_defined_function}' is defined (${defined_info}) but never called by the build." >>"${EXTENSION_MANAGER_LOG_FILE}" + echo "\$\$\$ Wishful hooking detected" "Function '${one_defined_function}' is defined (${defined_info}) but never called by the build." >> "${EXTENSION_MANAGER_LOG_FILE}" display_alert "Wishful hooking detected" "Function '${one_defined_function}' is defined (${defined_info}) but never called by the build." "wrn" fi done diff --git a/extensions/flash-kernel.sh b/extensions/flash-kernel.sh index 57c7c95f6..54d75d3fe 100644 --- a/extensions/flash-kernel.sh +++ b/extensions/flash-kernel.sh @@ -16,7 +16,7 @@ function extension_prepare_config__prepare_flash_kernel() { export CLOUD_INIT_CONFIG_LOCATION="/boot/firmware" # use /boot/firmware for cloud-init as well export VER="${FK__PUBLISHED_KERNEL_VERSION}" # For the VERSION export EXTRA_BSP_NAME="${EXTRA_BSP_NAME}-fk${FK__PUBLISHED_KERNEL_VERSION}" # Unique bsp name. - echo "-- starting" >"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log # Zero out the log for this extension. + echo "-- starting" > "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log # Zero out the log for this extension. } function post_install_kernel_debs__install_kernel_and_flash_packages() { @@ -24,8 +24,8 @@ function post_install_kernel_debs__install_kernel_and_flash_packages() { if [[ "${FK__EXTRA_PACKAGES}" != "" ]]; then display_alert "Installing flash-kernel extra packages" "${FK__EXTRA_PACKAGES}" - echo "-- install extra pkgs" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log - chroot "${SDCARD}" /bin/bash -c "DEBIAN_FRONTEND=noninteractive apt-get ${APT_EXTRA_DIST_PARAMS} -yqq --no-install-recommends install ${FK__EXTRA_PACKAGES}" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log || { + echo "-- install extra pkgs" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log + chroot "${SDCARD}" /bin/bash -c "DEBIAN_FRONTEND=noninteractive apt-get ${APT_EXTRA_DIST_PARAMS} -yqq --no-install-recommends install ${FK__EXTRA_PACKAGES}" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log || { display_alert "Failed to install flash-kernel's extra packages." "${EXTENSION}" "err" exit 28 } @@ -33,8 +33,8 @@ function post_install_kernel_debs__install_kernel_and_flash_packages() { if [[ "${FK__KERNEL_PACKAGES}" != "" ]]; then display_alert "Installing flash-kernel kernel packages" "${FK__KERNEL_PACKAGES}" - echo "-- install kernel pkgs" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log - chroot "${SDCARD}" /bin/bash -c "DEBIAN_FRONTEND=noninteractive apt-get ${APT_EXTRA_DIST_PARAMS} -yqq --no-install-recommends install ${FK__KERNEL_PACKAGES}" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log || { + echo "-- install kernel pkgs" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log + chroot "${SDCARD}" /bin/bash -c "DEBIAN_FRONTEND=noninteractive apt-get ${APT_EXTRA_DIST_PARAMS} -yqq --no-install-recommends install ${FK__KERNEL_PACKAGES}" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log || { display_alert "Failed to install flash-kernel's kernel packages." "${EXTENSION}" "err" exit 28 } @@ -46,8 +46,8 @@ function post_install_kernel_debs__install_kernel_and_flash_packages() { umount "${SDCARD}"/sys mkdir -p "${SDCARD}"/sys/firmware/efi - echo "-- install flash-kernel package" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log - chroot "${SDCARD}" /bin/bash -c "DEBIAN_FRONTEND=noninteractive apt-get ${APT_EXTRA_DIST_PARAMS} -yqq --no-install-recommends install ${FK__TOOL_PACKAGE}" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log || { + echo "-- install flash-kernel package" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log + chroot "${SDCARD}" /bin/bash -c "DEBIAN_FRONTEND=noninteractive apt-get ${APT_EXTRA_DIST_PARAMS} -yqq --no-install-recommends install ${FK__TOOL_PACKAGE}" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log || { display_alert "Failed to install flash-kernel package." "${EXTENSION}" "err" exit 28 } @@ -77,25 +77,25 @@ function pre_update_initramfs__setup_flash_kernel() { # hack, umount the chroot's /sys, otherwise flash-kernel tries to EFI flash due to the build host (!) being EFI umount "$chroot_target/sys" - echo "-- flash-kernel disabling hooks" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log - chroot "$chroot_target" /bin/bash -c "chmod -v -x /etc/kernel/postinst.d/initramfs-tools" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log 2>&1 - chroot "$chroot_target" /bin/bash -c "chmod -v -x /etc/initramfs/post-update.d/flash-kernel" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log 2>&1 + echo "-- flash-kernel disabling hooks" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log + chroot "$chroot_target" /bin/bash -c "chmod -v -x /etc/kernel/postinst.d/initramfs-tools" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log 2>&1 + chroot "$chroot_target" /bin/bash -c "chmod -v -x /etc/initramfs/post-update.d/flash-kernel" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log 2>&1 export FIRMWARE_DIR="${MOUNT}"/boot/firmware - call_extension_method "pre_initramfs_flash_kernel" <<-'PRE_INITRAMFS_FLASH_KERNEL' + call_extension_method "pre_initramfs_flash_kernel" <<- 'PRE_INITRAMFS_FLASH_KERNEL' *prepare to update-initramfs before flashing kernel via flash_kernel* A good spot to write firmware config to ${FIRMWARE_DIR} (/boot/firmware) before flash-kernel actually runs. PRE_INITRAMFS_FLASH_KERNEL local update_initramfs_cmd="update-initramfs -c -k all" display_alert "Updating flash-kernel initramfs..." "$update_initramfs_cmd" "" - echo "-- flash-kernel initramfs" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log - chroot "$chroot_target" /bin/bash -c "$update_initramfs_cmd" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log 2>&1 || { + echo "-- flash-kernel initramfs" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log + chroot "$chroot_target" /bin/bash -c "$update_initramfs_cmd" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log 2>&1 || { display_alert "Failed to run '$update_initramfs_cmd'" "Check ${DEST}/"${LOG_SUBPATH}"/flash-kernel.log" "err" exit 29 } - call_extension_method "pre_flash_kernel" <<-'PRE_FLASH_KERNEL' + call_extension_method "pre_flash_kernel" <<- 'PRE_FLASH_KERNEL' *run before running flash-kernel* Each board might need different stuff for flash-kernel to work. Implement it here. Write to `${MOUNT}`, eg: `"${MOUNT}"/etc/flash-kernel` @@ -103,16 +103,16 @@ function pre_update_initramfs__setup_flash_kernel() { local flash_kernel_cmd="flash-kernel --machine '${FK__MACHINE_MODEL}'" display_alert "flash-kernel" "${FK__MACHINE_MODEL}" "info" - echo "-- flash-kernel itself" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log - chroot "$chroot_target" /bin/bash -c "${flash_kernel_cmd}" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log 2>&1 || { + echo "-- flash-kernel itself" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log + chroot "$chroot_target" /bin/bash -c "${flash_kernel_cmd}" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log 2>&1 || { display_alert "Failed to run '${flash_kernel_cmd}'" "Check ${DEST}/"${LOG_SUBPATH}"/flash-kernel.log" "err" exit 29 } display_alert "Re-enabling" "initramfs-tools/flash-kernel hook for kernel" - echo "-- flash-kernel re-enabling hooks" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log - chroot "$chroot_target" /bin/bash -c "chmod -v +x /etc/kernel/postinst.d/initramfs-tools" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log 2>&1 - chroot "$chroot_target" /bin/bash -c "chmod -v +x /etc/initramfs/post-update.d/flash-kernel" >>"${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log 2>&1 + echo "-- flash-kernel re-enabling hooks" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log + chroot "$chroot_target" /bin/bash -c "chmod -v +x /etc/kernel/postinst.d/initramfs-tools" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log 2>&1 + chroot "$chroot_target" /bin/bash -c "chmod -v +x /etc/initramfs/post-update.d/flash-kernel" >> "${DEST}"/"${LOG_SUBPATH}"/flash-kernel.log 2>&1 umount_chroot "$chroot_target/" rm "$chroot_target"/usr/bin/"$QEMU_BINARY" diff --git a/extensions/gen-sample-extension-docs.sh b/extensions/gen-sample-extension-docs.sh index bd5a350c2..6a88baa40 100644 --- a/extensions/gen-sample-extension-docs.sh +++ b/extensions/gen-sample-extension-docs.sh @@ -4,24 +4,24 @@ function extension_metadata_ready__499_display_docs_generation_start_info() { } function extension_metadata_ready__docs_markdown() { - generate_markdown_docs_to_stdout >"${DEST}/"${LOG_SUBPATH}"/hooks.auto.docs.md" + generate_markdown_docs_to_stdout > "${DEST}/"${LOG_SUBPATH}"/hooks.auto.docs.md" } function extension_metadata_ready__docs_sample_extension() { mkdir -p "${SRC}/userpatches/extensions" - generate_sample_extension_to_stdout >"${SRC}/userpatches/extensions/sample-extension.sh" + generate_sample_extension_to_stdout > "${SRC}/userpatches/extensions/sample-extension.sh" } ## Internal functions ### Common stuff function read_common_data() { - export HOOK_POINT_CALLS_COUNT=$(wc -l <"${EXTENSION_MANAGER_TMP_DIR}/hook_point_calls.txt") - export HOOK_POINT_CALLS_UNIQUE_COUNT=$(sort <"${EXTENSION_MANAGER_TMP_DIR}/hook_point_calls.txt" | uniq | wc -l) + export HOOK_POINT_CALLS_COUNT=$(wc -l < "${EXTENSION_MANAGER_TMP_DIR}/hook_point_calls.txt") + export HOOK_POINT_CALLS_UNIQUE_COUNT=$(sort < "${EXTENSION_MANAGER_TMP_DIR}/hook_point_calls.txt" | uniq | wc -l) export HOOK_POINTS_WITH_MULTIPLE_CALLS="" # Read the hook_points (main, official names) from the hook point ordering file. - export ALL_HOOK_POINT_CALLS=$(xargs echo -n <"${EXTENSION_MANAGER_TMP_DIR}/hook_point_calls.txt") + export ALL_HOOK_POINT_CALLS=$(xargs echo -n < "${EXTENSION_MANAGER_TMP_DIR}/hook_point_calls.txt") } function loop_over_hook_points_and_call() { @@ -32,7 +32,7 @@ function loop_over_hook_points_and_call() { export HOOK_POINT="${one_hook_point}" export MARKDOWN_HEAD="$(head -1 "${EXTENSION_MANAGER_TMP_DIR}/${one_hook_point}.orig.md")" export MARKDOWN_BODY="$(tail -n +2 "${EXTENSION_MANAGER_TMP_DIR}/${one_hook_point}.orig.md")" - export COMPATIBILITY_NAMES="$(xargs echo -n <"${EXTENSION_MANAGER_TMP_DIR}/${one_hook_point}.compat")" + export COMPATIBILITY_NAMES="$(xargs echo -n < "${EXTENSION_MANAGER_TMP_DIR}/${one_hook_point}.compat")" ${callback} done } @@ -40,29 +40,29 @@ function loop_over_hook_points_and_call() { ## Markdown stuff function generate_markdown_docs_to_stdout() { read_common_data - cat < ${MARKDOWN_HEAD} @@ -92,7 +92,7 @@ HOOK_DOCS ## Bash sample extension stuff generate_sample_extension_to_stdout() { read_common_data - cat <
>"${MOUNT}"/etc/default/grub.d/99-armbian-host-side.cfg + cat <<- grubCfgFragHostSide >> "${MOUNT}"/etc/default/grub.d/99-armbian-host-side.cfg GRUB_DISABLE_OS_PROBER=true grubCfgFragHostSide @@ -101,14 +101,14 @@ pre_umount_final_image__install_grub() { if [[ "${UEFI_GRUB_TARGET_BIOS}" != "" ]]; then display_alert "Installing GRUB BIOS..." "${UEFI_GRUB_TARGET_BIOS} device ${LOOP}" "" - chroot "$chroot_target" /bin/bash -c "grub-install --verbose --target=${UEFI_GRUB_TARGET_BIOS} ${LOOP}" >>"$DEST"/"${LOG_SUBPATH}"/install.log 2>&1 || { + chroot "$chroot_target" /bin/bash -c "grub-install --verbose --target=${UEFI_GRUB_TARGET_BIOS} ${LOOP}" >> "$DEST"/"${LOG_SUBPATH}"/install.log 2>&1 || { exit_with_error "${install_grub_cmdline} failed!" } fi local install_grub_cmdline="update-grub && grub-install --verbose --target=${UEFI_GRUB_TARGET} --no-nvram --removable" # nvram is global to the host, even across chroot. take care. display_alert "Installing GRUB EFI..." "${UEFI_GRUB_TARGET}" "" - chroot "$chroot_target" /bin/bash -c "$install_grub_cmdline" >>"$DEST"/"${LOG_SUBPATH}"/install.log 2>&1 || { + chroot "$chroot_target" /bin/bash -c "$install_grub_cmdline" >> "$DEST"/"${LOG_SUBPATH}"/install.log 2>&1 || { exit_with_error "${install_grub_cmdline} failed!" } @@ -119,7 +119,7 @@ pre_umount_final_image__install_grub() { root_uuid=$(blkid -s UUID -o value "${LOOP}p1") # get the uuid of the root partition, this has been transposed # Create /boot/efi/EFI/BOOT/grub.cfg (EFI/ESP) which will load /boot/grub/grub.cfg (in the rootfs, generated by update-grub) - cat <<-grubEfiCfg >"${MOUNT}"/boot/efi/EFI/BOOT/grub.cfg + cat <<- grubEfiCfg > "${MOUNT}"/boot/efi/EFI/BOOT/grub.cfg search.fs_uuid ${root_uuid} root set prefix=(\$root)'/boot/grub' configfile \$prefix/grub.cfg @@ -140,17 +140,17 @@ pre_umount_final_image__900_export_kernel_and_initramfs() { } configure_grub() { - [[ -n "$SERIALCON" ]] \ - && GRUB_CMDLINE_LINUX_DEFAULT+=" console=${SERIALCON}" + [[ -n "$SERIALCON" ]] && + GRUB_CMDLINE_LINUX_DEFAULT+=" console=${SERIALCON}" - [[ "$BOOT_LOGO" == "yes" || "$BOOT_LOGO" == "desktop" && "$BUILD_DESKTOP" == "yes" ]] \ - && GRUB_CMDLINE_LINUX_DEFAULT+=" quiet splash plymouth.ignore-serial-consoles i915.force_probe=* loglevel=3" \ - || GRUB_CMDLINE_LINUX_DEFAULT+=" splash=verbose i915.force_probe=*" + [[ "$BOOT_LOGO" == "yes" || "$BOOT_LOGO" == "desktop" && "$BUILD_DESKTOP" == "yes" ]] && + GRUB_CMDLINE_LINUX_DEFAULT+=" quiet splash plymouth.ignore-serial-consoles i915.force_probe=* loglevel=3" || + GRUB_CMDLINE_LINUX_DEFAULT+=" splash=verbose i915.force_probe=*" # Enable Armbian Wallpaper on GRUB if [[ "${VENDOR}" == Armbian ]]; then mkdir -p "${MOUNT}"/usr/share/desktop-base/ - cat <<-grubWallpaper >>"${MOUNT}"/usr/share/desktop-base/grub_background.sh + cat <<- grubWallpaper >> "${MOUNT}"/usr/share/desktop-base/grub_background.sh WALLPAPER=/usr/share/images/grub/wallpaper.png COLOR_NORMAL=white/black COLOR_HIGHLIGHT=black/white @@ -158,7 +158,7 @@ configure_grub() { fi display_alert "GRUB EFI kernel cmdline" "${GRUB_CMDLINE_LINUX_DEFAULT} distro=${UEFI_GRUB_DISTRO_NAME} timeout=${UEFI_GRUB_TIMEOUT}" "" - cat <<-grubCfgFrag >>"${MOUNT}"/etc/default/grub.d/98-armbian.cfg + cat <<- grubCfgFrag >> "${MOUNT}"/etc/default/grub.d/98-armbian.cfg GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_DEFAULT}" GRUB_TIMEOUT_STYLE=menu # Show the menu with Kernel options (Armbian or -generic)... GRUB_TIMEOUT=${UEFI_GRUB_TIMEOUT} # ... for ${UEFI_GRUB_TIMEOUT} seconds, then boot the Armbian default. @@ -168,13 +168,13 @@ configure_grub() { grubCfgFrag if [[ "a${UEFI_GRUB_DISABLE_OS_PROBER}" != "a" ]]; then - cat <<-grubCfgFragHostSide >>"${MOUNT}"/etc/default/grub.d/98-armbian.cfg + cat <<- grubCfgFragHostSide >> "${MOUNT}"/etc/default/grub.d/98-armbian.cfg GRUB_DISABLE_OS_PROBER=${UEFI_GRUB_DISABLE_OS_PROBER} grubCfgFragHostSide fi if [[ "a${UEFI_GRUB_TERMINAL}" != "a" ]]; then - cat <<-grubCfgFragTerminal >>"${MOUNT}"/etc/default/grub.d/98-armbian.cfg + cat <<- grubCfgFragTerminal >> "${MOUNT}"/etc/default/grub.d/98-armbian.cfg GRUB_TERMINAL="${UEFI_GRUB_TERMINAL}" grubCfgFragTerminal fi diff --git a/extensions/marvell-tools.sh b/extensions/marvell-tools.sh index 7989f48ac..95f106b9f 100644 --- a/extensions/marvell-tools.sh +++ b/extensions/marvell-tools.sh @@ -3,5 +3,5 @@ function fetch_sources_tools__marvell_tools() { fetch_from_repo "https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell.git" "marvell-ddr" "branch:master" fetch_from_repo "https://github.com/MarvellEmbeddedProcessors/binaries-marvell" "marvell-binaries" "branch:binaries-marvell-armada-SDK10.0.1.0" fetch_from_repo "https://github.com/weidai11/cryptopp.git" "cryptopp" "branch:master" - fetch_from_repo "https://gitlab.nic.cz/turris/mox-boot-builder.git" "mox-boot" "branch:master" + fetch_from_repo "https://gitlab.nic.cz/turris/mox-boot-builder.git" "mox-boot" "branch:master" } diff --git a/extensions/nvidia.sh b/extensions/nvidia.sh index 2e3c55487..abee53f8f 100644 --- a/extensions/nvidia.sh +++ b/extensions/nvidia.sh @@ -7,7 +7,7 @@ function pre_install_kernel_debs__build_nvidia_kernel_module() { function post_install_kernel_debs__build_nvidia_kernel_module() { display_alert "Build kernel module" "${EXTENSION}" "info" - chroot "${SDCARD}" /bin/bash -c "apt -y -qq install nvidia-dkms-510 nvidia-driver-510 nvidia-settings nvidia-common" >>"$DEST"/"${LOG_SUBPATH}"/install.log 2>&1 || { + chroot "${SDCARD}" /bin/bash -c "apt -y -qq install nvidia-dkms-510 nvidia-driver-510 nvidia-settings nvidia-common" >> "$DEST"/"${LOG_SUBPATH}"/install.log 2>&1 || { exit_with_error "${install_grub_cmdline} failed!" } } diff --git a/extensions/rkbin-tools.sh b/extensions/rkbin-tools.sh index 07c4ac5c9..5617857cb 100644 --- a/extensions/rkbin-tools.sh +++ b/extensions/rkbin-tools.sh @@ -6,11 +6,11 @@ function build_host_tools__install_rkbin_tools() { # install only if git commit hash changed cd "${SRC}"/cache/sources/rkbin-tools || exit # need to check if /usr/local/bin/loaderimage to detect new Docker containers with old cached sources - if [[ ! -f .commit_id || $(improved_git rev-parse @ 2>/dev/null) != $(<.commit_id) || ! -f /usr/local/bin/loaderimage ]]; then + if [[ ! -f .commit_id || $(improved_git rev-parse @ 2> /dev/null) != $(< .commit_id) || ! -f /usr/local/bin/loaderimage ]]; then display_alert "Installing" "rkbin-tools" "info" mkdir -p /usr/local/bin/ install -m 755 tools/loaderimage /usr/local/bin/ install -m 755 tools/trust_merger /usr/local/bin/ - improved_git rev-parse @ 2>/dev/null >.commit_id + improved_git rev-parse @ 2> /dev/null > .commit_id fi } diff --git a/extensions/sunxi-tools.sh b/extensions/sunxi-tools.sh index bea22156e..5b699ac14 100644 --- a/extensions/sunxi-tools.sh +++ b/extensions/sunxi-tools.sh @@ -6,12 +6,12 @@ function build_host_tools__compile_sunxi_tools() { # Compile and install only if git commit hash changed cd "${SRC}"/cache/sources/sunxi-tools || exit # need to check if /usr/local/bin/sunxi-fexc to detect new Docker containers with old cached sources - if [[ ! -f .commit_id || $(improved_git rev-parse @ 2>/dev/null) != $(<.commit_id) || ! -f /usr/local/bin/sunxi-fexc ]]; then + if [[ ! -f .commit_id || $(improved_git rev-parse @ 2> /dev/null) != $(< .commit_id) || ! -f /usr/local/bin/sunxi-fexc ]]; then display_alert "Compiling" "sunxi-tools" "info" - make -s clean >/dev/null - make -s tools >/dev/null + make -s clean > /dev/null + make -s tools > /dev/null mkdir -p /usr/local/bin/ - make install-tools >/dev/null 2>&1 - improved_git rev-parse @ 2>/dev/null >.commit_id + make install-tools > /dev/null 2>&1 + improved_git rev-parse @ 2> /dev/null > .commit_id fi }