aboutsummaryrefslogtreecommitdiff
path: root/src/common-utils/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/common-utils/install.sh')
-rwxr-xr-xsrc/common-utils/install.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/common-utils/install.sh b/src/common-utils/install.sh
index 1170200..2d51a0b 100755
--- a/src/common-utils/install.sh
+++ b/src/common-utils/install.sh
@@ -9,6 +9,9 @@
set -e
+# Clean up
+rm -rf /var/lib/apt/lists/*
+
INSTALL_ZSH=${INSTALLZSH:-"true"}
INSTALL_OH_MY_ZSH=${INSTALLOHMYZSH:-"true"}
UPGRADE_PACKAGES=${UPGRADEPACKAGES:-"true"}
@@ -60,8 +63,10 @@ export DEBIAN_FRONTEND=noninteractive
apt_get_update()
{
- echo "Running apt-get update..."
- apt-get update -y
+ if [ "$(find /var/lib/apt/lists/* | wc -l)" = "0" ]; then
+ echo "Running apt-get update..."
+ apt-get update -y
+ fi
}
# Run install apt-utils to avoid debconf warning then verify presence of other common developer tools and dependencies
@@ -447,4 +452,7 @@ echo -e "\
RC_SNIPPET_ALREADY_ADDED=${RC_SNIPPET_ALREADY_ADDED}\n\
ZSH_ALREADY_INSTALLED=${ZSH_ALREADY_INSTALLED}" > "${MARKER_FILE}"
+# Clean up
+rm -rf /var/lib/apt/lists/*
+
echo "Done!"