mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Add shebangs for shellcheck (#4493)
* Add shebangs for shellcheck See #AR-1406 * Add shebangs for shellcheck Also for `extensions` scripts
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
## Configuration
|
||||
export LOG_ALL_HOOK_TRACES=no # Should we log all hook function traces to stdout? (no, or level: wrn info)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# This runs *after* user_config. Don't change anything not coming from other variables or meant to be configured by the user.
|
||||
function extension_prepare_config__prepare_flash_kernel() {
|
||||
# Configuration defaults, or lack thereof.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
## Hooks
|
||||
function extension_metadata_ready__499_display_docs_generation_start_info() {
|
||||
display_alert "Generating hook documentation and sample extension"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# This runs *after* user_config. Don't change anything not coming from other variables or meant to be configured by the user.
|
||||
function extension_prepare_config__prepare_grub-riscv64() {
|
||||
display_alert "Prepare config" "${EXTENSION}" "info"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# This runs *after* user_config. Don't change anything not coming from other variables or meant to be configured by the user.
|
||||
function extension_prepare_config__prepare_grub-sbc-media() {
|
||||
display_alert "Prepare config" "${EXTENSION}" "info"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# This runs *after* user_config. Don't change anything not coming from other variables or meant to be configured by the user.
|
||||
function extension_prepare_config__prepare_flash_kernel() {
|
||||
# Extension configuration defaults.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
function fetch_sources_tools__marvell_tools() {
|
||||
fetch_from_repo "https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell" "marvell-tools" "branch:master"
|
||||
fetch_from_repo "https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell.git" "marvell-ddr" "branch:master"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
function pre_install_kernel_debs__build_nvidia_kernel_module() {
|
||||
|
||||
export INSTALL_HEADERS="yes"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
function fetch_sources_tools__rkbin_tools() {
|
||||
fetch_from_repo "https://github.com/armbian/rkbin" "rkbin-tools" "branch:master"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
function fetch_sources_tools__sunxi_tools() {
|
||||
fetch_from_repo "https://github.com/linux-sunxi/sunxi-tools" "sunxi-tools" "branch:master"
|
||||
}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# global variables managing the state of the extension manager. treat as private.
|
||||
declare -A extension_function_info # maps a function name to a string with KEY=VALUEs information about the defining extension
|
||||
declare -i initialize_extension_manager_counter=0 # how many times has the extension manager initialized?
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
create_board_package() {
|
||||
display_alert "Creating board support package for CLI" "$CHOSEN_ROOTFS" "info"
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
create_desktop_package() {
|
||||
|
||||
echo "Showing PACKAGE_LIST_DESKTOP before postprocessing" >> "${DEST}"/${LOG_SUBPATH}/output.log
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# copy_all_packages_files_for <folder> to package
|
||||
#
|
||||
copy_all_packages_files_for() {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
function cli_entrypoint() {
|
||||
if [[ "${ARMBIAN_ENABLE_CALL_TRACING}" == "yes" ]]; then
|
||||
set -T # inherit return/debug traps
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Add the variables needed at the beginning of the path
|
||||
check_args() {
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
compile_atf() {
|
||||
if [[ $CLEAN_LEVEL == *make* ]]; then
|
||||
display_alert "Cleaning" "$ATFSOURCEDIR" "info"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
compile_firmware() {
|
||||
display_alert "Merging and packaging linux firmware" "@host" "info"
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
create_linux-source_package() {
|
||||
ts=$(date +%s)
|
||||
local sources_pkg_dir tmp_src_dir
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
compile_kernel() {
|
||||
if [[ $CLEAN_LEVEL == *make* ]]; then
|
||||
display_alert "Cleaning" "$LINUXSOURCEDIR" "info"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
compilation_prepare() {
|
||||
|
||||
# Packaging patch for modern kernels should be one for all.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# advanced_patch <dest> <family> <board> <target> <branch> <description>
|
||||
#
|
||||
# parameters:
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
compile_uboot() {
|
||||
# not optimal, but extra cleaning before overlayfs_wrapper should keep sources directory clean
|
||||
if [[ $CLEAN_LEVEL == *make* ]]; then
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
grab_version() {
|
||||
local ver=()
|
||||
ver[0]=$(grep "^VERSION" "${1}"/Makefile | head -1 | awk '{print $(NF)}' | grep -oE '^[[:digit:]]+')
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Expected variables
|
||||
# - aggregated_content
|
||||
# - potential_paths
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
desktop_element_available_for_arch() {
|
||||
local desktop_element_path="${1}"
|
||||
local targeted_arch="${2}"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
function interactive_config_prepare_terminal() {
|
||||
if [[ -z $ROOT_FS_CREATE_ONLY ]]; then
|
||||
# override stty size
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Myy : Menu configuration for choosing desktop configurations
|
||||
show_menu() {
|
||||
provided_title=$1
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# create_chroot <target_dir> <release> <arch>
|
||||
#
|
||||
create_chroot() {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# Installing debian packages or package files in the armbian build system.
|
||||
# The function accepts four optional parameters:
|
||||
# autoupdate - If the installation list is not empty then update first.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# mount_chroot <target>
|
||||
#
|
||||
# helper to reduce code duplication
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
function get_urls() {
|
||||
local catalog=$1
|
||||
local filename=$2
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#
|
||||
# This function retries Git operations to avoid failure in case remote is borked
|
||||
# If the git team needs to call a remote server, use this function.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
adding_packages() {
|
||||
# add deb files to repository if they are not already there
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# prepare_host_basic
|
||||
#
|
||||
# * installs only basic packages
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# wait_for_package_manager
|
||||
#
|
||||
# * installation will break if we try to install when package manager is running
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# prepare_host
|
||||
#
|
||||
# * checks and installs necessary packages
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#--------------------------------------------------------------------------------------------------------------------------------
|
||||
# fingerprint_image <out_txt_file> [image_filename]
|
||||
# Saving build summary to the image
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# update_initramfs
|
||||
#
|
||||
# this should be invoked as late as possible for any modifications by
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# check_loop_device <device_node>
|
||||
#
|
||||
check_loop_device() {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# prepare_partitions
|
||||
#
|
||||
# creates image file, partitions and fs
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# create_image
|
||||
#
|
||||
# finishes creation of image from cached rootfs
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#--------------------------------------------------------------------------------------------------------------------------------
|
||||
# Let's have unique way of displaying alerts
|
||||
#--------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
run_on_sdcard() {
|
||||
|
||||
# Lack of quotes allows for redirections and pipes easily.
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# exit_with_error <message> <highlight>
|
||||
#
|
||||
# a way to terminate build process
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
###############################################################################
|
||||
#
|
||||
# build_task_is_enabled()
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
DISTRIBUTIONS_DESC_DIR="config/distributions"
|
||||
|
||||
function prepare_and_config_main_build_single() {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# unmount_on_exit
|
||||
#
|
||||
unmount_on_exit() {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
install_deb_chroot() {
|
||||
|
||||
local package=$1
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
install_ppa_prerequisites() {
|
||||
|
||||
# Myy : So... The whole idea is that, a good bunch of external sources
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#--------------------------------------------------------------------------------------------------------------------------------
|
||||
# Create kernel boot logo from packages/blobs/splash/logo.png and packages/blobs/splash/spinner.gif (animated)
|
||||
# and place to the file /lib/firmware/bootsplash
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
# get_package_list_hash
|
||||
#
|
||||
# returns md5 hash for current package list and rootfs cache version
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
customize_image() {
|
||||
|
||||
# for users that need to prepare files at host
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
install_common() {
|
||||
display_alert "Applying common tweaks" "" "info"
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
install_distribution_specific() {
|
||||
|
||||
display_alert "Applying distribution specific tweaks for" "$RELEASE" "info"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
post_debootstrap_tweaks() {
|
||||
|
||||
# remove service start blockers and QEMU binary
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
desktop_postinstall() {
|
||||
|
||||
# disable display manager for the first run
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
while read -r file; do
|
||||
# shellcheck source=/dev/null
|
||||
|
||||
Reference in New Issue
Block a user