Skip to content

Instantly share code, notes, and snippets.

@hypersymmetry
Created November 18, 2016 16:29
Show Gist options
  • Save hypersymmetry/55cded9be6a9604b515eb3d80052a4be to your computer and use it in GitHub Desktop.
Save hypersymmetry/55cded9be6a9604b515eb3d80052a4be to your computer and use it in GitHub Desktop.
Automatically update Atom editor
#!/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