Skip to content

Instantly share code, notes, and snippets.

@belchior
Last active October 4, 2017 01:41
Show Gist options
  • Select an option

  • Save belchior/d06c48a6182a9346145789d297a0178c to your computer and use it in GitHub Desktop.

Select an option

Save belchior/d06c48a6182a9346145789d297a0178c to your computer and use it in GitHub Desktop.
Update Atom Editor to the latest version in Ubuntu
function atom-url;
curl -s https://api.github.com/repos/atom/atom/releases/latest | awk '/browser_download_url.*deb/ { print $2 }' | sed 's/"//g'
end;
function atom-download;
curl -LOk (atom-url)
end;
function atom-install;
sudo dpkg -i ./atom-amd64.deb
end;
@belchior

belchior commented Sep 20, 2017

Copy link
Copy Markdown
Author

First, you need to add the snippets to your fish config.

curl -sL https://gist.github.com/belchior/d06c48a6182a9346145789d297a0178c/raw/atom-update.fish >> ~/.config/fish/config.fish

And then reload your config

source ~/.config/fish/config.fish

Now you are ready to use the commands

atom-url; # will show you the URL of the latest version of Atom
atom-download; # will download the package
atom-install # will install the package

At the future you only need to execute the above commands to make Atom updated

atom-download;
atom-install;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment