#!/usr/bin/env bash # retrieve latest vscodium package wget -q https://api.github.com/repos/VSCodium/vscodium/releases/latest grep 'browser_download_url": ".*.AppImage"' latest | awk '{ print substr ($0, 32 ) }' | awk '{ print substr( $0, 1, length($0)-1 ) }' > url rm latest # kill codium if already running if pgrep -f "codium" > /dev/null then pkill -9 codium fi # remove VSCodium package if already exists [ -f $HOME/VSCodium.AppImage ] && rm $HOME/VSCodium.AppImage # download the latest vscodium AppImage wget -q --show-progress -i url -O VSCodium.AppImage rm url # make it executable chmod u+x VSCodium.AppImage # moving it to the home folder [ -f $HOME/VSCodium.AppImage ] || mv VSCodium.AppImage $HOME/VSCodium.AppImage echo "" echo "VSCodium is now downloaded at $HOME/VSCodium.AppImage."