diff --git a/build.sh b/build.sh index 6228e60..2bcde4f 100755 --- a/build.sh +++ b/build.sh @@ -8,14 +8,14 @@ TARGET_ARCH="${TARGET_ARCH:-x86_64}" HOST_ARCH="$(uname -m)" function install_dependencies { - apt update - local packages="bc flex bison gcc make libelf-dev libssl-dev squashfs-tools busybox-static tree cpio curl patch" + local packages=( + bc bison busybox-static cpio curl flex gcc libelf-dev libssl-dev make patch squashfs-tools tree + ) - if [[ "$TARGET_ARCH" == "arm64" && "$HOST_ARCH" != "aarch64" ]]; then - packages="$packages gcc-aarch64-linux-gnu" - fi + [[ "${TARGET_ARCH}" == "arm64" && "${HOST_ARCH}" != "aarch64" ]] && packages+=( gcc-aarch64-linux-gnu ) - apt install -y $packages + apt update + apt install -y "${packages[@]}" } # prints the git tag corresponding to the newest and best matching the provided kernel version $1