Skip to content

Instantly share code, notes, and snippets.

@jaapie
Last active October 23, 2022 23:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jaapie/8e0091577301decf4d79fcf51874a708 to your computer and use it in GitHub Desktop.
Save jaapie/8e0091577301decf4d79fcf51874a708 to your computer and use it in GitHub Desktop.
A simple bash script for Debian-based systems that downloads the latest version of Azure Data Studio and installs it. Requires the html-xml-utils package to be installed
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "error: you must be root to run this script"
exit
fi
FILENAME=/tmp/azuredatastudio-latest.deb
LINK=$(curl -s "https://learn.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio?view=sql-server-ver16" | hxnormalize -x | hxselect 'table a[data-linktype="external"]' | sed -r 's/(.*)(<a[^>]*>.deb<\/a>)(.*)/\2/' | sed -r 's/(.*)href="([^"]*)"(.*)/\2/')
wget $LINK -O $FILENAME
sudo dpkg -i $FILENAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment