diff options
Diffstat (limited to 'src/aws-cli/install.sh')
-rwxr-xr-x | src/aws-cli/install.sh | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/src/aws-cli/install.sh b/src/aws-cli/install.sh index b2566c9..4ab2234 100755 --- a/src/aws-cli/install.sh +++ b/src/aws-cli/install.sh @@ -62,21 +62,16 @@ get_common_setting() { echo "$1=${!1}" } -# Function to run apt-get if needed -apt_get_update_if_needed() +apt_get_update() { - if [ ! -d "/var/lib/apt/lists" ] || [ "$(ls /var/lib/apt/lists/ | wc -l)" = "0" ]; then - echo "Running apt-get update..." - apt-get update - else - echo "Skipping apt-get update." - fi + echo "Running apt-get update..." + apt-get update -y } # Checks if packages are installed and installs them if not check_packages() { if ! dpkg -s "$@" > /dev/null 2>&1; then - apt_get_update_if_needed + apt_get_update apt-get -y install --no-install-recommends "$@" fi } |