Skip to content

Instantly share code, notes, and snippets.

@CodingAnarchy
Created June 26, 2015 23:43
Show Gist options
  • Save CodingAnarchy/6c45e09ac429e1c0fd43 to your computer and use it in GitHub Desktop.
Save CodingAnarchy/6c45e09ac429e1c0fd43 to your computer and use it in GitHub Desktop.
Atom Updater for Fedora (tired of manual updates!)
#!/bin/bash
rm atom.x86_64.rpm*
atom_version=`atom --version`
latest_tag=`git ls-remote --tags https://github.com/atom/atom.git | tail -n 1 | cut -f 2`
latest=`basename $latest_tag`
latest=`echo $latest | sed 's/^v//'`
# echo $atom_version
# echo $latest
test "$atom_version" == "$latest" &&
echo "Latest version $latest is already installed. Exiting..." &&
exit 0
wget https://github.com/atom/atom/releases/download/v$latest/atom.x86_64.rpm
sudo dnf install atom.x86_64.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment