forked from hcartiaux/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·110 lines (70 loc) · 2.28 KB
/
install.sh
File metadata and controls
executable file
·110 lines (70 loc) · 2.28 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
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/bin/sh
set -e
MAIL_PERSO='hyacinthe.cartiaux@free.fr'
MAIL_PRO='hyacinthe.cartiaux@uni.lu'
PLAN='World domination!'
DOTFILES=~/.dotfiles
MYLAPTOP=hc-promax14
HOST=$(hostname -s)
echo "$PLAN" >~/.plan
[ ! -d ~/.dotfiles ] && git clone https://github.com/hcartiaux/dotfiles.git $DOTFILES
[ -d ~/.dotfiles ] && ( cd $DOTFILES; git pull )
cd ~
mkdir -p ~/.config
## zsh
ln -sf $DOTFILES/zsh/zshrc ~/.zshrc
## bash
ln -sf $DOTFILES/bash/bashrc ~/.bashrc
ln -sf $DOTFILES/bash/inputrc ~/.inputrc
ln -sf $DOTFILES/bash/bash_profile ~/.bash_profile
ln -sf $DOTFILES/bash/profile ~/.profile
ln -sf $DOTFILES/bash/bash_logout ~/.bash_logout
ln -sf $DOTFILES/bash/bash_environment ~/.bash_environment
ln -sf $DOTFILES/bash/bash_oar ~/.bash_oar
ln -sf $DOTFILES/bash/bash_slurm ~/.bash_slurm
ln -sf $DOTFILES/bash/bash_aliases ~/.bash_aliases
# ksh
ln -sf $DOTFILES/ksh/kshrc ~/.kshrc
## vim
ln -sf $DOTFILES/vim/vimrc ~/.vimrc
## tmux
ln -sf $DOTFILES/tmux ~/.config/
## screen
ln -sf $DOTFILES/screen/screenrc ~/.screenrc
## rtorrent
ln -sf $DOTFILES/rtorrent/rtorrent.rc ~/.rtorrent.rc
mkdir -p ~/.rtorrent
## git
ln -sf $DOTFILES/git/gitconfig ~/.gitconfig
## ssh
mkdir -p ~/.ssh/sockets
ln -sf $DOTFILES/ssh/sshpubkey ~/.ssh/sshpubkey
if [ ! -e ~/.ssh/config ]; then
ln -s $DOTFILES/ssh/config ~/.ssh/
fi
if [ ! -e ~/.ssh/config.home ]; then
ln -s $DOTFILES/ssh/config.home ~/.ssh/
fi
## wget
ln -sf $DOTFILES/wget/wgetrc ~/.wgetrc
# GnuPG
mkdir -p ~/.gnupg
ln -sf $DOTFILES/gnupg/gpg.conf ~/.gnupg/gpg.conf
ln -sf $DOTFILES/gnupg/gpg-agent.conf ~/.gnupg/gpg-agent.conf
if [ "$HOST" = "$MYLAPTOP" ]; then
if [ "$USER" = "hcartiaux" ]; then
echo $MAIL_PRO >~/.forward
ln -sf $DOTFILES/git/gitconfig-work ~/.gitconfig-user
## RVM configuration
ln -sf $DOTFILES/rvm/rvmrc ~/.rvmrc
## temporary files
ln -sf /tmp ~/.cache
else
echo $MAIL_PERSO >~/.forward
ln -sf $DOTFILES/git/gitconfig-personal ~/.gitconfig-user
## temporary files
ln -sf /dev/shm ~/.cache
fi
# neovim
ln -sf $DOTFILES/nvim ~/.config/
fi