Last active
August 29, 2015 14:26
-
-
Save mkokho/0675a57b51203ef55c70 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/bin/sh | |
#writing content to a file | |
write_commands () | |
{ | |
file=$1 | |
#adding MELPA repository | |
echo "(require 'package)" >> $file | |
echo "(add-to-list 'package-archives '(\"melpa\" . \"http://melpa.org/packages/\"))" >> $file | |
echo "(package-initialize)" >> $file | |
#installing and loading zenburn color theme | |
themePck="zenburn-theme" | |
themeName=zenburn | |
echo "(or (package-installed-p '$themePck) (package-install '$themePck))" >> $file | |
echo "(load-theme '$themeName t)" >> $file | |
} | |
#installing emacs 2.4 | |
if [ -f /usr/bin/emacs24 ]; then | |
echo "emacs 2.4 is already installed" | |
else | |
sudo apt-get update | |
sudo apt-get install emacs24 | |
fi | |
#creating deafult initialization file | |
DEFAULT=/usr/local/share/emacs/site-lisp/default.el | |
if [ -f $DEFAULT ]; then | |
echo "initialization file default.el for emacs already exists" | |
else | |
sudo touch $DEFAULT | |
write_commands $DEFAULT | |
fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment