-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·56 lines (42 loc) · 1.22 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
#!/bin/bash
# Update package list
sudo apt update
sudo apt upgrade -y
PATH=$HOME/bin:$PATH
# Install zsh if it doesn't exist
if ! [ -x "$(command -v zsh)" ]; then
sudo apt install zsh -y
fi
# Install git if it doesn't exist
if ! [ -x "$(command -v git)" ]; then
sudo apt install git -y
fi
# Create bin directory
mkdir -p $HOME/bin
# Install fzf if it doesn't exist
if ! [ -x "$(command -v fzf)" ]; then
wget https://github.com/junegunn/fzf/releases/download/v0.54.3/fzf-0.54.3-linux_amd64.tar.gz
tar -xvf fzf-0.54.3-linux_amd64.tar.gz
mv fzf $HOME/bin
rm fzf-0.54.3-linux_amd64.tar.gz
fi
# Install zoxide if it doesn't exist
if ! [ -x "$(command -v zoxide)" ]; then
curl -sSfL https://raw.githubusercontent.com/ajeetdsouza/zoxide/main/install.sh | sh
fi
# Install oh-my-posh
if ! [ -x "$(command -v oh-my-posh)" ]; then
curl -s https://ohmyposh.dev/install.sh | bash -s -- -d ~/bin
fi
# Install JetBrains Mono font
oh-my-posh font install JetBrainsMono
# Configure zsh if zshrc doesn't exist
if [ ! -f $HOME/.zshrc ]; then
cp .zshrc $HOME
fi
# Configure oh-my-posh if it doesn't exist
if [ ! -f $HOME/omp.toml ]; then
cp omp.toml $HOME
fi
# Set default shell to zsh
sudo chsh -s $(which zsh) $USER