Skip to content

Instantly share code, notes, and snippets.

@as-cii
Created May 16, 2018 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save as-cii/e1fe1c2ce2fdc036451915750814e968 to your computer and use it in GitHub Desktop.
Save as-cii/e1fe1c2ce2fdc036451915750814e968 to your computer and use it in GitHub Desktop.
Nightly build installation script for Atom
#!/usr/bin/env bash
set -e
GREEN='\033[0;32m'
NC='\033[0m' # No Color
atom_zipped_path=$(mktemp)
atom_unzipped_parent_path=$(mktemp -d)
function cleanup {
echo -e "${GREEN}Cleaning up${NC}"
rm -rf $atom_zipped_path
rm -rf $atom_unzipped_parent_path
}
trap cleanup EXIT
echo -e "${GREEN}Downloading latest Atom version${NC}"
curl --location https://atom.io/download/mac?channel=dev > $atom_zipped_path
echo -e "${GREEN}Unzipping downloaded artifact${NC}"
unzip -qq $atom_zipped_path -d $atom_unzipped_parent_path
echo -e "${GREEN}Replacing existing Atom installation${NC}"
rm -rf /Applications/Atom.app
mv $atom_unzipped_parent_path/Atom.app /Applications/Atom.app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment