aboutsummaryrefslogtreecommitdiff
path: root/src/git/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/git/install.sh')
-rwxr-xr-xsrc/git/install.sh13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/git/install.sh b/src/git/install.sh
index 1da6500..7e6f71a 100755
--- a/src/git/install.sh
+++ b/src/git/install.sh
@@ -74,21 +74,16 @@ receive_gpg_keys() {
fi
}
-# 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
}