diff --git a/images/linux/scripts/base/apt.sh b/images/linux/scripts/base/apt.sh index 15307421f..b7ad9e7bb 100644 --- a/images/linux/scripts/base/apt.sh +++ b/images/linux/scripts/base/apt.sh @@ -1,9 +1,18 @@ #!/bin/bash export DEBIAN_FRONTEND=noninteractive -apt-get -yqq update -apt-get -yqq dist-upgrade +apt-get -yq update +apt-get -yq dist-upgrade systemctl disable apt-daily.service systemctl disable apt-daily.timer systemctl disable apt-daily-upgrade.timer systemctl disable apt-daily-upgrade.service + +# Configure apt to always assume Y +echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes + +# Use apt-fast for parallel downloads +apt-get install aria2 +add-apt-repository -y ppa:apt-fast/stable +apt-get update +apt-get -y install apt-fast diff --git a/images/linux/scripts/helpers/apt.sh b/images/linux/scripts/helpers/apt.sh deleted file mode 100644 index e95a2160f..000000000 --- a/images/linux/scripts/helpers/apt.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash -################################################################################ -## File: apt.sh -## Desc: This script contains helper functions for using dpkg and apt -################################################################################ - -## Use dpkg to figure out if a package has already been installed -## Example use: -## if ! IsInstalled packageName; then -## echo "packageName is not installed!" -## fi -function IsInstalled { - dpkg -S $1 &> /dev/null -} - -# Configure apt to always assume Y -echo "APT::Get::Assume-Yes \"true\";" > /etc/apt/apt.conf.d/90assumeyes - -# Use apt-fast for parallel downloads -apt-get install aria2 -add-apt-repository -y ppa:apt-fast/stable -apt-get update -apt-get -y install apt-fast diff --git a/images/linux/scripts/helpers/install.sh b/images/linux/scripts/helpers/install.sh index 0843983ed..e5cb08006 100644 --- a/images/linux/scripts/helpers/install.sh +++ b/images/linux/scripts/helpers/install.sh @@ -33,4 +33,13 @@ download_with_retries() { echo "Could not download $URL" return 1 +} + +## Use dpkg to figure out if a package has already been installed +## Example use: +## if ! IsInstalled packageName; then +## echo "packageName is not installed!" +## fi +function IsInstalled { + dpkg -S $1 &> /dev/null } \ No newline at end of file diff --git a/images/linux/scripts/installers/build-essential.sh b/images/linux/scripts/installers/build-essential.sh index 0c98e42cd..f84e5857b 100644 --- a/images/linux/scripts/installers/build-essential.sh +++ b/images/linux/scripts/installers/build-essential.sh @@ -6,6 +6,7 @@ # Source the helpers for use with the script source $HELPER_SCRIPTS/document.sh +source $HELPER_SCRIPTS/install.sh PACKAGE=build-essential diff --git a/images/linux/scripts/installers/docker-moby.sh b/images/linux/scripts/installers/docker-moby.sh index f5cb8ef3a..8ee78a8c0 100644 --- a/images/linux/scripts/installers/docker-moby.sh +++ b/images/linux/scripts/installers/docker-moby.sh @@ -5,6 +5,7 @@ ################################################################################ source $HELPER_SCRIPTS/document.sh +source $HELPER_SCRIPTS/install.sh source $HELPER_SCRIPTS/os.sh docker_package=moby diff --git a/images/linux/scripts/installers/dotnetcore-sdk.sh b/images/linux/scripts/installers/dotnetcore-sdk.sh index 8c1006ea2..0cd324fe4 100644 --- a/images/linux/scripts/installers/dotnetcore-sdk.sh +++ b/images/linux/scripts/installers/dotnetcore-sdk.sh @@ -3,8 +3,10 @@ ## File: dotnetcore-sdk.sh ## Desc: Installs .NET Core SDK ################################################################################ + source $HELPER_SCRIPTS/etc-environment.sh source $HELPER_SCRIPTS/document.sh +source $HELPER_SCRIPTS/install.sh source $HELPER_SCRIPTS/os.sh # Ubuntu 20 doesn't support EOL versions diff --git a/images/linux/scripts/installers/hhvm.sh b/images/linux/scripts/installers/hhvm.sh index e27d40e21..97c5c7b1e 100644 --- a/images/linux/scripts/installers/hhvm.sh +++ b/images/linux/scripts/installers/hhvm.sh @@ -6,6 +6,7 @@ # Source the helpers for use with the script source $HELPER_SCRIPTS/document.sh +source $HELPER_SCRIPTS/install.sh hhvm_package=hhvm