-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate.sh
More file actions
executable file
·34 lines (28 loc) · 772 Bytes
/
update.sh
File metadata and controls
executable file
·34 lines (28 loc) · 772 Bytes
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
set -eufo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/scripts"
source "$SCRIPT_DIR/lib.sh"
#### System Packages ####
show_progress "Updating system packages"
case "$(uname -s)" in
Darwin)
brew update && brew upgrade && brew cleanup
;;
Linux)
if command -v apt-get >/dev/null; then
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean
fi
;;
esac
log_success "System packages updated"
#### Mise ####
show_progress "Updating mise"
mise self-update --yes
log_success "mise updated"
show_progress "Updating mise tools"
mise upgrade
log_success "mise tools updated"
#### Chezmoi ####
show_progress "Updating chezmoi"
chezmoi upgrade
log_success "chezmoi updated"