forked from Strat1987/mac-install
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate-machine.sh
More file actions
executable file
·39 lines (31 loc) · 859 Bytes
/
update-machine.sh
File metadata and controls
executable file
·39 lines (31 loc) · 859 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
35
36
37
38
39
#!/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\" -"
brew update
brew upgrade
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 \"apm\" -"
apm update --no-confirm
apm clean
echo
echo "- Updating \"npm\" -"
npm update -g
echo
echo "- Updating \"homebrew casks (via the brew-cask-upgrade tool)\" -"
brew cu --cleanup
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 ---"