mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
* Add shebangs for shellcheck See #AR-1406 * Add shebangs for shellcheck Also for `extensions` scripts
31 lines
738 B
Bash
31 lines
738 B
Bash
#!/usr/bin/env bash
|
|
# prepare_host_basic
|
|
#
|
|
# * installs only basic packages
|
|
#
|
|
prepare_host_basic() {
|
|
|
|
# command:package1 package2 ...
|
|
# list of commands that are neeeded:packages where this command is
|
|
local check_pack install_pack
|
|
local checklist=(
|
|
"dialog:dialog"
|
|
"fuser:psmisc"
|
|
"getfacl:acl"
|
|
"uuid:uuid uuid-runtime"
|
|
"curl:curl"
|
|
"gpg:gnupg"
|
|
"gawk:gawk"
|
|
)
|
|
|
|
for check_pack in "${checklist[@]}"; do
|
|
if ! which ${check_pack%:*} > /dev/null; then local install_pack+=${check_pack#*:}" "; fi
|
|
done
|
|
|
|
if [[ -n $install_pack ]]; then
|
|
display_alert "Updating and installing basic packages on host" "$install_pack"
|
|
sudo bash -c "apt-get -qq update && apt-get install -qq -y --no-install-recommends $install_pack"
|
|
fi
|
|
|
|
}
|