aboutsummaryrefslogtreecommitdiff
path: root/src/oryx/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/oryx/install.sh')
-rwxr-xr-xsrc/oryx/install.sh17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/oryx/install.sh b/src/oryx/install.sh
index a528ec7..342a723 100755
--- a/src/oryx/install.sh
+++ b/src/oryx/install.sh
@@ -51,29 +51,24 @@ function updaterc() {
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 -y install --no-install-recommends "$@"
+ apt_get_update
+ DEBIAN_FRONTEND=noninteractive apt-get -y install --no-install-recommends "$@"
fi
}
install_dotnet_using_apt() {
echo "Attempting to auto-install dotnet..."
install_from_microsoft_feed=false
- apt_get_update_if_needed
+ apt_get_update
apt-get -yq install dotnet6 || install_from_microsoft_feed="true"
if [ "${install_from_microsoft_feed}" = "true" ]; then