forked from seagle0128/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_emacs.sh
executable file
·44 lines (40 loc) · 1.36 KB
/
install_emacs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
#############################################################
# Install latest stable Emacs
# Author: Vincent Zhang <[email protected]>
# URL: https://github.com/seagle0128/dotfiles
#############################################################
# Get OS name
SYSTEM=`uname -s`
# Use colors, but only if connected to a terminal, and that terminal
# supports them.
if command -v tput >/dev/null 2>&1; then
ncolors=$(tput colors)
fi
if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then
RED="$(tput setaf 1)"
GREEN="$(tput setaf 2)"
YELLOW="$(tput setaf 3)"
BLUE="$(tput setaf 4)"
BOLD="$(tput bold)"
NORMAL="$(tput sgr0)"
else
RED=""
GREEN=""
YELLOW=""
BLUE=""
BOLD=""
NORMAL=""
fi
printf "${BLUE} ➜ Installing Emacs...${NORMAL}\n"
if [ "$SYSTEM" = "Darwin" ] && command -v brew >/dev/null 2>&1; then
# brew tap d12frosted/emacs-plus
# brew install emacs-plus --without-spacemacs-icon --with-jansson --with-xwidgets --HEAD
# brew install emacs --with-gnutls --with-cocoa --with-modules --with-imagemagick@6 --with-librsvg
brew cask install emacs
elif [ "$SYSTEM" = "Linux" ] && command -v add-apt-repository >/dev/null 2>&1; then
sudo add-apt-repository -y ppa:kelleyk/emacs
# sudo add-apt-repository -y ppa:ubuntu-elisp/ppa
sudo apt-get update
sudo apt-get install emacs26
fi