- #!/bin/bash
 
- set -o errexit -o pipefail
 
- if [[ "$OS" = "Darwin" ]]; then
 
- 	brew cask install atom
 
- 	defaults write com.github.atom ApplePressAndHoldEnabled -bool false
 
- else
 
- 	if ! has atom; then
 
- 		URL='https://atom.io/download/deb'
 
- 		TMP_FILE="/tmp/gimme.atom.latest.deb"
 
- 		curl -fSLC- "$URL" -o "$TMP_FILE"
 
- 		sudo dpkg -i "$TMP_FILE"
 
- 		rm "$TMP_FILE"
 
- 	fi
 
- fi
 
 
  |