This repository has been archived on 2023-12-11. You can view files and clone it, but cannot push or open issues or pull requests.
downloadcodium/updateVSCodium.sh

28 lines
No EOL
809 B
Bash

#!/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."