-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·95 lines (81 loc) · 2.15 KB
/
setup.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
#!/bin/bash
function brew(){
echo "=====================
Setting up brew...
====================="
if ! command -v brew >/dev/null 2>&1; then
echo "please install brew first"
exit 1
fi
# Install brew packages
brew bundle install --file=~/.dotfiles/Brewfile
}
function copy_dot_files() {
echo "=====================
Copying dotfiles...
====================="
IFS='
'
for file in $(ls -a ~/.dotfiles/files); do
if [ "$file" != "." ] && [ "$file" != ".." ] && [ "$file" != ".ssh" ]
then
ln -s ~/.dotfiles/files/"$file" ~/"$file"
fi
done
unset IFS
}
function copy_ssh_keys() {
echo "=====================
Copying ssh keys...
====================="
mkdir ~/.ssh
IFS='
'
for file in $(ls -a ~/.dotfiles/directories/.ssh); do
if [ "$file" != "." ] && [ "$file" != ".." ]
then
cp ~/.dotfiles/directories/.ssh/"$file" ~/.ssh/"$file"
ansible-vault decrypt ~/.ssh/"$file"
chmod 700 ~/.ssh/"$file"
ssh-add -K ~/.ssh/"$file"
fi
done
eval "$(ssh-agent -s)"
unset IFS
cat ssh-config.txt > ~/.ssh/config
}
function xcode() {
echo "=====================
Installing xcode...
====================="
xcode-select --install
}
function zsh(){
echo "=====================
Installing zsh...
====================="
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
echo "=====================
Downloading antigen...
====================="
curl -L git.io/antigen > ~/antigen.zsh
}
echo "=====================
Installing dotfiles for $OS...
====================="
xcode
copy_dot_files
brew
copy_ssh_keys
zsh
echo "=====================
Installing node stable...
====================="
# nodejs stable
nvm install --lts
echo -e "=====================
For Raycast, open raycast and type \"Import Settings & Data\" and select the file \"raycast.config\" in the dotfiles directory
Make sure to also restart your terminal for the changes to take effect.
Don't forget Docker Desktop!
For Intellij, Select File > Manage IDE Settings > Import Settings and select the file \"intellij.zip\" in the dotfiles directory
====================="