Created
May 16, 2018 08:33
-
-
Save as-cii/e1fe1c2ce2fdc036451915750814e968 to your computer and use it in GitHub Desktop.
Nightly build installation script for Atom
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
#!/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