diff options
Diffstat (limited to 'src/dotnet')
-rwxr-xr-x | src/dotnet/install.sh | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/dotnet/install.sh b/src/dotnet/install.sh index 7cf38f1..f8231ac 100755 --- a/src/dotnet/install.sh +++ b/src/dotnet/install.sh @@ -107,20 +107,16 @@ updaterc() { fi } -# Run apt-get if needed. -apt_get_update_if_needed() { - 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 +apt_get_update() +{ + echo "Running apt-get update..." + apt-get update -y } # Check 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 } |