From 05d6c2f5b1c426eaa158c46fdecea5f83cdbaa56 Mon Sep 17 00:00:00 2001 From: Richard Koliser Date: Mon, 15 Aug 2022 16:39:20 +0000 Subject: [PATCH] KASM-3073 Add a proper version sort --- src/ubuntu/install/edge/install_edge.sh | 2 +- src/ubuntu/install/vs_code/install_vs_code.sh | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/ubuntu/install/edge/install_edge.sh b/src/ubuntu/install/edge/install_edge.sh index 20e0b1f..6722bfb 100644 --- a/src/ubuntu/install/edge/install_edge.sh +++ b/src/ubuntu/install/edge/install_edge.sh @@ -5,7 +5,7 @@ CHROME_ARGS="--password-store=basic --no-sandbox --ignore-gpu-blocklist --user-d apt-get update -EDGE_BUILD=$(curl -q https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-dev/ | grep href | grep .deb | sed 's/.*href="//g' | cut -d '"' -f1 | tail -1) +EDGE_BUILD=$(curl -q https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-dev/ | grep href | grep .deb | sed 's/.*href="//g' | cut -d '"' -f1 | sort --version-sort | tail -1) wget -q -O edge.deb https://packages.microsoft.com/repos/edge/pool/main/m/microsoft-edge-dev/$EDGE_BUILD apt-get install -y ./edge.deb diff --git a/src/ubuntu/install/vs_code/install_vs_code.sh b/src/ubuntu/install/vs_code/install_vs_code.sh index 40ffd9c..0656785 100644 --- a/src/ubuntu/install/vs_code/install_vs_code.sh +++ b/src/ubuntu/install/vs_code/install_vs_code.sh @@ -1,9 +1,9 @@ #!/usr/bin/env bash set -ex ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/x64/g') - wget -q https://update.code.visualstudio.com/latest/linux-deb-${ARCH}/stable -O vs_code.deb -dpkg -i vs_code.deb +apt-get update +apt-get install -y ./vs_code.deb mkdir -p /usr/share/icons/hicolor/apps wget -O /usr/share/icons/hicolor/apps/vscode.svg https://kasm-static-content.s3.amazonaws.com/icons/vscode.svg sed -i '/Icon=/c\Icon=/usr/share/icons/hicolor/apps/vscode.svg' /usr/share/applications/code.desktop @@ -18,3 +18,10 @@ apt-get update apt-get install -y python3-setuptools \ python3-venv \ python3-virtualenv + +# Cleanup +apt-get autoclean +rm -rf \ + /var/lib/apt/lists/* \ + /var/tmp/* \ + /tmp/*