-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·40 lines (31 loc) · 1.31 KB
/
install.sh
File metadata and controls
executable file
·40 lines (31 loc) · 1.31 KB
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
#!/bin/bash
if [ ! -d "$HOME/.oh-my-zsh" ]; then
# install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended --keep-zshrc
# install p10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k"
# install zsh plugins
git clone https://github.com/zsh-users/zsh-autosuggestions "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions"
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting"
fi
if [ ! -d "$HOME/.cfg" ]; then
# clone dotfiles in $HOME
git clone --bare git@github.com:jackewing/dotfiles.git --branch bare "$HOME/.cfg"
function config {
git --git-dir="$HOME/.cfg/" --work-tree="$HOME" "$@"
}
if config checkout; then
echo "Checked out config.";
else
echo "Backing up pre-existing dot files.";
mkdir -p "$HOME/.config-backup"
config checkout 2>&1 | grep -E "\s+\." | awk {'print $1'} | xargs -I{} mv $HOME/{} $HOME/.config-backup/{}
fi;
config config status.showUntrackedFiles no
fi
# Packages need for Ubuntu
cat /etc/os-release | grep "NAME=\"Ubuntu\""
if [ $? -eq 0 ]; then
sudo apt update
sudo apt install -y ripgrep xsel tmux
fi