diff options
Diffstat (limited to 'src/python/install.sh')
-rwxr-xr-x | src/python/install.sh | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/python/install.sh b/src/python/install.sh index e9f95c6..b1a75d9 100755 --- a/src/python/install.sh +++ b/src/python/install.sh @@ -197,21 +197,16 @@ oryx_install() { 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 } @@ -237,7 +232,7 @@ install_from_source() { libbz2-dev libreadline-dev libxml2-dev xz-utils libgdbm-dev tk-dev dirmngr \ libxmlsec1-dev libsqlite3-dev libffi-dev liblzma-dev uuid-dev if ! type git > /dev/null 2>&1; then - apt_get_update_if_needed + apt_get_update apt-get -y install --no-install-recommends git fi |