forked from SamSpiri/infra-workspace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautoinstall.sh
34 lines (26 loc) · 1.05 KB
/
autoinstall.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
#!/bin/bash -e
#
# bash -c "$(curl https://github.com/OpusCapita/infra-workspace/raw/master/autoinstall.sh -H 'Cache-Control: no-cache' -L -s)" -- clean
#
if [[ "$1" == "clean" ]]; then
rm -rf "$HOME/.oh-my-zsh"
rm -rf "$HOME/.zshrc"
rm -rf "$HOME/.p10k.zsh"
fi
# Install zsh.
sudo apt install -y zsh;
# powerlevel10k
sh -c "$(curl -s -L https://github.com/OpusCapita/zsh-in-docker/raw/OC/zsh-in-docker.sh)" -- \
-a 'CASE_SENSITIVE="true"' \
-p git \
-p https://github.com/zsh-users/zsh-completions \
-p https://github.com/zsh-users/zsh-syntax-highlighting
# get & overwrite zsh config
curl https://github.com/OpusCapita/infra-workspace/raw/master/zshrc.zsh -H "Cache-Control: no-cache" -L > ~/.zshrc
# get powerlevel10k config
curl https://github.com/OpusCapita/infra-workspace/raw/master/.p10k.zsh -H "Cache-Control: no-cache" -L > ~/.p10k.zsh
# preserve your history
[[ ! -f "$HOME/.histfile" ]] && cat "$HOME/.bash_history" > "$HOME/.histfile"
# set as default
sudo usermod --shell /bin/zsh $USER
echo "Relogin for changes to take effect."