-
Notifications
You must be signed in to change notification settings - Fork 13
/
update-machine.sh
executable file
·45 lines (36 loc) · 1.13 KB
/
update-machine.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
#!/usr/bin/env bash
START_DATE=$(date +"%d.%m.%Y | %H:%M:%S")
SECONDS=0
echo "--- Updater for this machine started at: $START_DATE ---"
echo
echo "- Updating \"macOS\" -"
softwareupdate --install --all
echo
echo "- Updating \"brew\" formulas and casks -"
brew update
brew upgrade
# when unable to pin an old version of an app:
# https://apple.stackexchange.com/questions/435901/homebrew-how-to-ignore-cask-formula-on-brew-upgrade-since-pin-has-no-c
# brew upgrade $(brew list | grep --invert-match hashicorp-boundary-desktop)
brew cleanup
echo “you can hit mas upgrade to upgrade theses apps from the app store:”
mas outdated
echo “install with: mas upgrade”
echo
echo "- Updating \"SDKMAN installed SDKs\" -"
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk upgrade
sdk selfupdate
# echo
# echo "- Updating \"apm\" -"
# apm update --no-confirm
# apm clean
echo
echo "- Updating \"npm\" -"
npm update -g
END_DATE=$(date +"%d.%m.%Y | %H:%M:%S")
ELAPSED=" $(($SECONDS / 3600))hrs $((($SECONDS / 60) % 60))min $(($SECONDS % 60))sec"
echo
echo "--- Updater for macOS finished at: $END_DATE ---"
echo
echo "--- Updater for macOS took: $ELAPSED ---"