-
Notifications
You must be signed in to change notification settings - Fork 1
/
update
executable file
·37 lines (28 loc) · 870 Bytes
/
update
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
#!/bin/bash
set -e
echo "Git pull"
git pull --autostash
echo "Update fzf"
cd ~/.fzf/
git pull
./install --all
cd -
echo "update packages installed with cargo"
cargo install-update -a -g
echo "Update kube-ps1"
curl -s -o ~/bin/kube-ps1.sh https://raw.githubusercontent.com/jonmosco/kube-ps1/master/kube-ps1.sh
echo "Update vim plugins"
nvim +PlugUpgrade +qall || true
nvim +PlugUpdate +qall || true
nvim +GoUpdateBinaries +qall || true
#must be after PlugUpgrade since we want newer golangci-lint than :GoUpdateBinaries provide
echo "Update golangci-lint"
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b "$(go env GOPATH)/bin"
./common
DIST=$(awk -F= '/^NAME/{print $2}' /etc/os-release)
if [[ "$DIST" == *"Ubuntu"* ]]; then
sudo apt update && sudo apt upgrade
sudo snap refresh
./install-go
fi
echo "Done"