-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall-cli
executable file
·62 lines (49 loc) · 1.61 KB
/
install-cli
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
#!/usr/bin/env zsh
# Check if oh-my-zsh is installed
# Install if missing
if [ ! -r "${HOME}/.oh-my-zsh" ]
then
echo "Installing oh-my-zsh"
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
fi
# Check if Powerlevel10k is installed
# Install if missing
if [ ! -r "${HOME}/.oh-my-zsh/custom/themes/powerlevel10k" ]
then
echo "Installing Powerlevel 10k"
cd ${HOME}
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
fi
# Link all the files
echo "Linking vimrc with ~/.vimrc"
ln -sf $PWD/cli-configs/vimrc ~/.vimrc
echo "Linking .vim with ~/.vim"
ln -sf $PWD/cli-configs/vim/ ~/.vim/
echo "Linking zshrc with ~/.zshrc"
ln -sf $PWD/cli-configs/zshrc ~/.zshrc
echo "Linking zsh.aliases with ~/.zsh.aliases"
ln -sf $PWD/cli-configs/zsh.aliases ~/.zsh.aliases
echo "Linking p10k.zsh with ~/.p10k.zsh"
ln -sf $PWD/cli-configs/p10k.zsh ~/.p10k.zsh
echo "Linking p10kFull.zsh with ~/.p10kFull.zsh"
ln -sf $PWD/cli-configs/p10kFull.zsh ~/.p10kFull.zsh
# Check if nvim exists on system and link if it does
# command -v nvim &> /dev/null
if command -v nvim &> /dev/null
then
echo "Linking nvim with ~/.config/nvim"
ln -sf $PWD/cli-configs/nvim ~/.config/nvim
fi
if [ ! -r "${HOME}/.local/share/fonts" ]
then
echo "Making Local Fonts Directory"
mkdir ~/.local/share/fonts/
fi
echo "Install Nerd Font MesloLGS"
cp fonts/MesloLGS_NF_Regular.ttf ~/.local/share/fonts/.
if [[ $SHELL != "/bin/zsh" ]]
then
echo "Setting default shell to zsh"
echo "Command being run is: chsh -s /bin/zsh"
chsh -s /bin/zsh
fi