-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·44 lines (34 loc) · 974 Bytes
/
setup.sh
File metadata and controls
executable file
·44 lines (34 loc) · 974 Bytes
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
#!/bin/sh
exists() {
if hash $1 2>/dev/null; then
return 0
else
echo "$1 doesn't exist"
return 1
fi
}
exists curl
has_curl=$?
exists git
has_git=$?
exists zsh
has_zsh=$?
#check required lib exists
if [ $has_curl ] && [ $has_git ] && [ $has_zsh ]; then
echo "All required libb exists...."
else
echo "One ore more of curl, git, zsh is not installed. Exiting..."
exit 1
fi
if [ -d "$HOME/.oh-my-zsh" ]; then
echo "ob-my-zsh already installed"
else
echo "Installing oh-my-zsh"
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
#copy powerlevel10k zsh-theme
git clone --depth=1 "https://github.com/romkatv/powerlevel10k.git" ~/.oh-my-zsh/custom/themes/powerlevel10k
#copy .zshrc
curl -LSso ~/.zshrc "https://raw.githubusercontent.com/tsengvn/config/main/.zshrc"
#copy p10k config
curl -LSso ~/.p10k.zsh "https://raw.githubusercontent.com/tsengvn/config/main/.p10k.zsh"