diff options
Diffstat (limited to 'src/common-utils')
-rw-r--r-- | src/common-utils/devcontainer-feature.json | 2 | ||||
-rwxr-xr-x | src/common-utils/install.sh | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/common-utils/devcontainer-feature.json b/src/common-utils/devcontainer-feature.json index e916135..c5f8621 100644 --- a/src/common-utils/devcontainer-feature.json +++ b/src/common-utils/devcontainer-feature.json @@ -1,6 +1,6 @@ { "id": "common-utils", - "version": "1.1.2", + "version": "1.1.3", "name": "Common Debian Utilities", "documentationURL": "https://github.com/devcontainers/features/tree/main/src/common-utils", "description": "Installs a set of common command line utilities, Oh My Zsh!, and sets up a non-root user.", 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!" |