-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·97 lines (71 loc) · 2.04 KB
/
install.sh
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
#!/usr/bin/env zsh
cd $HOME/.dotfiles
. ./variables.sh
echo 'Installing on the server or local machine?'
echo '(c)lient [default]'
echo '(s)erver'
read installationType
isClient=true
case $installationType in
"s"|"server")
isClient=false
;;
""|"c"|"client")
isClient=true
;;
*)
echo 'Nothing selected. Exiting'
exit 1
;;
esac
echo "Installing for $(if $isClient; then echo 'client'; else echo 'server'; fi)"
# tmux
ln -s "$HOME/.dotfiles/terminal/tmux.conf" "$HOME/.tmux.conf"
# zellij
ln -s "$HOME/.dotfiles/terminal/zellij" "$HOME/.config/zellij"
# alacritty
ln -s "$HOME/.dotfiles/terminal/alacritty/alacritty.toml" "$HOME/.alacritty.toml"
# zsh
ln -s "$HOME/.dotfiles/terminal/zshrc.sh" "$HOME/.zshrc"
source './terminal/zshrc.sh'
touch $HOME/.zshenv
echo "source $HOME/.dotfiles/terminal/aliases.sh" >> .zshenv
# Git
ln -s $(pwd)/git/.gitconfig ~/.gitconfig
ln -s $(pwd)/git/.gitignore_global ~/.gitignore_global
# karabiner
mkdir -p ~/.config
ln -s $(pwd)/settings/karabiner ~/.config/
# neovim
ln -s $(pwd)/nvim ~/.config/
echo "Have you installed Xcode already? Install it firstly"
read -n 1 </dev/tty
if $isClient;
then
# Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap homebrew/cask-fonts
brew install $(<brew.txt)
brew update
open ~/.dotfiles/terminal/Personal.itermcolors
fi
# Nano
mkdir -p $HOME/.nano
ln -s $HOME/.dotfiles/nano/.nanorc $HOME/.nanorc
# NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
if [[ "$OSTYPE" == darwin* ]] && $isClient; then
echo 'Install manual applications. Press any key to continue\n'
while read line; do
appName=$(cut -d'|' -f1 <<<"$line")
appLink=$(cut -d'|' -f2 <<<"$line")
echo $appName
open $appLink
read -n 1 </dev/tty
done < manual.txt
echo 'Theme for Xcode'
open etc/Darcula.dvtcolortheme
fi
# Velja
cp ./settings/$VELJA_PLIST_NAME $VELJA_PLIST
echo 'Profit'