Closed daviewales closed 3 months ago
@daviewales The reason here is because we only ship the release to those two versions for now.
You could comment that perhaps? I opened the issue because I forgot what version I was on, assumed it was 20.04, and then it didn't work. Auto-detecting is an improvement, because the default copy-paste path will now work on two versions instead of one.
Here's another version which tracks the supported versions, and only attempts to install on supported systems, and prints a friendly error message on unsupported systems:
# Note: Only 20.04 and 22.04 are currently supported
SUPPORTED='20.04 22.04'
if grep $(lsb_release -sr) <<< "$SUPPORTED"; then
sudo apt-add-repository https://packages.microsoft.com/ubuntu/$(lsb_release -sr)/prod
else
echo $(lsb_release -sr) is not currently supported
echo "supported versions: $SUPPORTED"
fi
For example, instead of:
You might instead suggest: