diff options
Diffstat (limited to 'src/node/install.sh')
-rwxr-xr-x | src/node/install.sh | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/src/node/install.sh b/src/node/install.sh index 80731cd..8eae62e 100755 --- a/src/node/install.sh +++ b/src/node/install.sh @@ -61,21 +61,15 @@ updaterc() { fi } -# Function to 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 } # 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 } @@ -186,7 +180,7 @@ if [ "${INSTALL_TOOLS_FOR_NODE_GYP}" = "true" ]; then to_install="${to_install} python3-minimal" fi if [ ! -z "${to_install}" ]; then - apt_get_update_if_needed + apt_get_update apt-get -y install ${to_install} fi fi |