This repository was archived by the owner on Jan 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup
More file actions
executable file
·49 lines (37 loc) · 1.24 KB
/
setup
File metadata and controls
executable file
·49 lines (37 loc) · 1.24 KB
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
45
46
47
48
49
#-*-sh-*-*
#PWD=`pwd`
#THISFILE="$PWD/$0"
#SHARE=${THISFILE//PWD/}
#SHARE=${SHARE//`basename $0`/}
[ -z $SHARE ] && SHARE=${HOME}/commonrc
# if commonrc dir does not exist, then we need to clone it.
if [ ! -d ${SHARE} ]; then
mkdir -p ${SHARE}
cd ${SHARE}
git clone https://github.com/pheaver/commonrc.git .
fi
mkdir -p ~/local/share/emacs/site-lisp
ln -sf ${SHARE}/zshrc ${HOME}/.zshrc
ln -sf ${SHARE}/bashrc ${HOME}/.bashrc
ln -sf ${SHARE}/bashrc ${HOME}/.bash_profile
ln -sf ${SHARE}/zshenv ${HOME}/.zshenv
ln -sf ${SHARE}/.screenrc ${HOME}/.screenrc
ln -sf ${SHARE}/.tmux.conf ${HOME}/.tmux.conf
ln -sf ${SHARE}/.gitconfig ${HOME}/.gitconfig
ln -sf ${SHARE}/Xmodmap ${HOME}/.Xmodmap
ln -sf ${SHARE}/Xresources ${HOME}/.Xresources
ln -sf ${SHARE}/.ctags ${HOME}/.ctags
mkdir -p ${HOME}/.i3
ln -sf ${SHARE}/i3/config ${HOME}/.i3/config
ln -sf ${SHARE}/i3/i3blocks.conf ${HOME}/.i3/i3blocks.conf
mkdir -p ${HOME}/.config/awesome
ln -sf ${SHARE}/awesome/rc.lua ${HOME}/.config/awesome/rc.lua
chmod a+x ${SHARE}/bin/*
chmod a+x ${SHARE}/setup
if [ ! -e ~/.emacs.d/init.el ]; then
mkdir -p ~/.emacs.d
echo '(load-file "~/commonrc/emacs/emacs.el")' > ~/.emacs.d/init.el
fi
cd ${SHARE}
git submodule update --init
make -C ${SHARE}/emacs