Created
November 18, 2016 16:29
-
-
Save hypersymmetry/55cded9be6a9604b515eb3d80052a4be to your computer and use it in GitHub Desktop.
Automatically update Atom editor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Updates the Atom to the latest version | |
# http://askubuntu.com/questions/589469/how-to-automatically-update-atom-editor | |
wget -q https://github.com/atom/atom/releases/latest -O /tmp/latest | |
version=`cat /tmp/latest | grep -o -E 'href="([^"#]+)atom-amd64.deb"' | cut -d'"' -f2 | sort | uniq | cut -d"/" -f6` | |
echo "Latest version for atom is: $version" | |
echo "Downloading version $version" | |
curl -L 'https://github.com'$(cat /tmp/latest | grep -o -E 'href="([^"#]+)atom-amd64.deb"' | cut -d'"' -f2 | sort | uniq) -o /tmp/atom-amd64.deb -# | |
echo "Download Completed" | |
sudo dpkg -i /tmp/atom-amd64.deb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment