Created
January 27, 2015 11:49
-
-
Save ReactiveRaven/b9e34142c751044cd500 to your computer and use it in GitHub Desktop.
atom update ubuntu
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 | |
remver=`wget -O - https://atom.io/releases 2>/dev/null | grep "<h2>v" | cut -f 2 -d "v" | cut -f 1 -d " " | head -n 1 | tr -d " \n";`; | |
locver=`/usr/bin/atom --version | tr -d " \n"`; | |
if [ "$remver" != "$locver" ]; | |
then | |
echo "outdated $locver -> $remver"; | |
echo "Need sudo."; | |
sudo echo "Thank you."; | |
if [ -f /tmp/atom.deb ]; | |
then | |
sudo rm /tmp/atom.deb; | |
fi; | |
wget https://atom.io/download/deb -O /tmp/atom.deb; | |
sudo dpkg --install /tmp/atom.deb; | |
else | |
echo "ok $locver"; | |
fi; | |
/usr/bin/atom; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment