aboutsummaryrefslogtreecommitdiffstats
path: root/ubuntu_move_in.sh
blob: a21cff8352c61bd7dc0ecf14c45ad2d8b24e3176 (plain) (blame)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
echo "Updaing and dist-upgrading"
sudo apt-get update && sudo apt-get -y dist-upgrade

echo "Installing some utilities"
sudo apt-get install -y \
     build-essential \
     docker \
     git \
     mosh \
     python-pip \
     rxvt-unicode-256color \
     scdaemon \
     pcscd \
     gpgsm \
     yubikey-personalization-gui \
     stow \
     zsh \
     w3m \
     xsel # Terminal copy paste helper

sudo pip install virtualenvwrapper

cd $HOME

if ! [ -d "$HOME/dotfiles" ]; then
    echo "Dotfiles not found... cloning"
    git -c http.sslVerify=false clone https://beehive.io/jason/dotfiles.git
    cd dotfiles
else
    echo "Dotfiles found... updating"
    cd dotfiles
    git -c http.sslVerify=false pull
fi

./common_move_in.sh

cd $HOME/dotfiles/
echo "Linking xorg configs..."
stow xorg
# Enables clipboard with C-Shift-c/v in urxvt with xsel
sudo ln -s $HOME/dotfiles/urxvt-clipboard /usr/lib/urxvt/perl/clipboard

# emacs
if ! [ -x /usr/local/bin/emacs ]; then
    echo "Installing Emacs from source..."
    if ! [ -d "$HOME/Code/emacs" ]; then
	cd $HOME/Code
	git clone git://git.sv.gnu.org/emacs.git
    fi

    sudo apt-get -y install autoconf automake texinfo \
	 xserver-xorg-dev libgtk-3-dev libwebkitgtk-3.0-dev \
	 libjpeg-dev libgif-dev libxpm-dev libtiff5-dev \
	 libncurses5-dev libgnutls28-dev libmagick++-dev libotf-dev \
	 libselinux1-dev libgconf2-dev libacl1-dev libgpm-dev \
	 libm17n-dev

    cd $HOME/Code/emacs/ && \
	git checkout emacs-25.1 &&\
	./autogen.sh && \
	make clean &&\
	./configure CFLAGS=-no-pie --with-xwidgets --with-sound --with-x-toolkit=gtk3 --with-gnutls && \
	make && \
	sudo make install


fi

# i3
if ! [ `which i3` ]; then
    echo "Installing i3..."
    sudo apt-get install -y i3
    cd $HOME/dotfiles/
    stow i3
fi

# fonts
if ! [ -e "$HOME/.fonts/" ]; then
    echo "Installing fonts..."
    cd $HOME/dotfiles/
    stow fonts
fi

# other utils
sudo apt-get install -y clipit feh xbindkeys fetchmail qasmixer

echo "Things to manually download"
echo ""
echo "- Vivaldi"
echo "- Google Chrome"