Skip to content

Commit

Permalink
move IsInstalled and apt-fast
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Timofeev committed Jul 8, 2020
1 parent cebf522 commit a7ee8ab
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
13 changes: 11 additions & 2 deletions images/linux/scripts/base/apt.sh
Original file line number Diff line number Diff line change
@@ -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
23 changes: 0 additions & 23 deletions images/linux/scripts/helpers/apt.sh

This file was deleted.

9 changes: 9 additions & 0 deletions images/linux/scripts/helpers/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
1 change: 1 addition & 0 deletions images/linux/scripts/installers/build-essential.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions images/linux/scripts/installers/docker-moby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
################################################################################

source $HELPER_SCRIPTS/document.sh
source $HELPER_SCRIPTS/install.sh
source $HELPER_SCRIPTS/os.sh

docker_package=moby
Expand Down
2 changes: 2 additions & 0 deletions images/linux/scripts/installers/dotnetcore-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions images/linux/scripts/installers/hhvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a7ee8ab

Please sign in to comment.