aboutsummaryrefslogtreecommitdiff
path: root/src/desktop-lite/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/desktop-lite/install.sh')
-rwxr-xr-xsrc/desktop-lite/install.sh16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/desktop-lite/install.sh b/src/desktop-lite/install.sh
index 806a7e1..b05896c 100755
--- a/src/desktop-lite/install.sh
+++ b/src/desktop-lite/install.sh
@@ -149,22 +149,16 @@ copy_fluxbox_config() {
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
}
@@ -176,7 +170,7 @@ check_packages() {
# Ensure apt is in non-interactive to avoid prompts
export DEBIAN_FRONTEND=noninteractive
-apt_get_update_if_needed
+apt_get_update
# On older Ubuntu, Tilix is in a PPA. on Debian strech its in backports.
if [[ -z $(apt-cache --names-only search ^tilix$) ]]; then