forked from omid/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·95 lines (74 loc) · 1.95 KB
/
install.sh
File metadata and controls
executable file
·95 lines (74 loc) · 1.95 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
#!/usr/bin/env bash
if [ -d ~/.dotfiles ]; then
echo 'Please remove or rename "~/.dotfiles" directory" first'
exit
fi;
### check dependencies
if ! type git > /dev/null; then
echo 'Please install git before starting'
exit
fi
if ! type zsh > /dev/null; then
echo 'Please install zsh before starting'
exit
fi
if ! type wget > /dev/null; then
echo 'Please install wget before starting'
exit
fi
if ! type exa > /dev/null; then
echo 'Please install exa'
exit
fi
if ! type bat > /dev/null; then
echo 'Please install bat'
exit
fi
if ! type archey > /dev/null; then
echo 'Please install archey'
fi
if ! type git-extras > /dev/null; then
echo 'You can install git-extras'
fi
if ! type tmux > /dev/null; then
echo 'You can install tmux'
fi
if ! type axel > /dev/null; then
echo 'You can install axel'
fi
if ! type autojump > /dev/null; then
echo 'You can install autojump'
fi
if ! type az > /dev/null; then
echo 'You can install azure-cli'
fi
if ! type fd > /dev/null; then
echo 'You can install fd'
fi
### clone main repository
echo 'Cloning dotfiles...'
git clone -q --depth=1 https://github.com/leon-marzahn/dotfiles.git ~/.dotfiles
### ZSH
if [ ! -f ~/.zsh_local ]; then
echo '# Put your local ZSH changes and configs here' > ~/.zsh_local
fi
ln -sf ~/.dotfiles/zsh/zshrc ~/.zshrc
### GIT
if [ -f ~/.gitconfig ]; then
mv ~/.gitconfig ~/.gitconfig_local
fi
if [ -f ~/.gitconfig_local ] && [ $(grep -q gitconfig_local ~/.gitconfig_local) ]; then
rm -rf ~/.gitconfig_local
fi
if [ ! -f ~/.gitconfig_local ]; then
echo '# Put your local Git changes and configs here' > ~/.gitconfig_local
fi
ln -sf ~/.dotfiles/gitconfig ~/.gitconfig
### TMUX
ln -sf ~/.dotfiles/tmux.conf ~/.tmux.conf
### AXEL
ln -sf ~/.dotfiles/axelrc ~/.axelrc
### WGET
ln -sf ~/.dotfiles/wgetrc ~/.wgetrc
### finalize
echo 'Finished. To change your default shell to ZSH, run "chsh -s $(grep /zsh$ /etc/shells | tail -1)"'