g_it/macupdater
Archived
1
0
Fork 0

Added a readme and apm commands.

This commit is contained in:
g* 2018-10-06 16:24:42 +02:00
commit 9c8480bc88
4 changed files with 154 additions and 115 deletions

View file

@ -1,48 +1,130 @@
macupdater 6.0 macupdater 6.0
Log: Sun Sep 23 01:04:58 SAST 2018 Log: Sat Oct 6 13:26:11 SAST 2018
-------------------------------------------------------------------------------------
Brew Brew
Updated 1 tap (homebrew/cask). Already up-to-date.
Brew updates complete. Skipping install of buo/cask-upgrade tap. It is already installed.
Using buo/cask-upgrade
Node Skipping install of homebrew/bundle tap. It is already installed.
Using homebrew/bundle
/Users/gugulethu/homebrew/bin/npm -> /Users/gugulethu/homebrew/lib/node_modules/npm/bin/npm-cli.js Skipping install of homebrew/cask tap. It is already installed.
/Users/gugulethu/homebrew/bin/npx -> /Users/gugulethu/homebrew/lib/node_modules/npm/bin/npx-cli.js Using homebrew/cask
+ npm@6.4.1 Skipping install of homebrew/cask-fonts tap. It is already installed.
updated 1 package in 13.285s Using homebrew/cask-fonts
up to date in 2.621s Skipping install of homebrew/cask-versions tap. It is already installed.
found 0 vulnerabilities Using homebrew/cask-versions
Skipping install of homebrew/core tap. It is already installed.
Node updates complete. Using homebrew/core
Skipping install of openssl formula. It is already up-to-date.
Ruby Using openssl
Skipping install of bash formula. It is already up-to-date.
Updating rubygems-update Using bash
Updating installed gems Skipping install of bash-completion formula. It is already up-to-date.
Updating CFPropertyList Using bash-completion
Cleaning up installed gems... Skipping install of bash-git-prompt formula. It is already up-to-date.
Clean Up Complete Using bash-git-prompt
Ruby updates complete. Skipping install of coreutils formula. It is already up-to-date.
Using coreutils
Perl Skipping install of curl formula. It is already up-to-date.
Using curl
no perlbrew environment is currently in use Skipping install of ffmpeg formula. It is already up-to-date.
Your perlbrew is up-to-date. Using ffmpeg
Skipping install of freetype formula. It is already up-to-date.
Done Using freetype
Perl updates complete. Skipping install of git formula. It is already up-to-date.
Using git
macOS Skipping install of gnupg formula. It is already up-to-date.
Using gnupg
Software Update Tool Skipping install of imagemagick formula. It is already up-to-date.
Using imagemagick
Finding available software Skipping install of mackup formula. It is already up-to-date.
macOS updates complete. Using mackup
Skipping install of make formula. It is already up-to-date.
Using make
Skipping install of mas formula. It is already up-to-date.
Using mas
All updates complete. END Skipping install of nmap formula. It is already up-to-date.
Using nmap
Skipping install of node formula. It is already up-to-date.
Using node
Skipping install of openvpn formula. It is already up-to-date.
Using openvpn
Skipping install of rsync formula. It is already up-to-date.
Using rsync
Skipping install of sphinx-doc formula. It is already up-to-date.
Using sphinx-doc
Skipping install of trash formula. It is already up-to-date.
Using trash
Skipping install of tree formula. It is already up-to-date.
Using tree
Skipping install of wget formula. It is already up-to-date.
Using wget
Skipping install of wp-cli formula. It is already up-to-date.
Using wp-cli
Skipping install of youtube-dl formula. It is already up-to-date.
Using youtube-dl
Skipping install of zsh formula. It is already up-to-date.
Using zsh
Skipping install of zsh-completions formula. It is already up-to-date.
Using zsh-completions
Skipping install of zsh-git-prompt formula. It is already up-to-date.
Using zsh-git-prompt
Skipping install of zsh-syntax-highlighting formula. It is already up-to-date.
Using zsh-syntax-highlighting
Using adapter
Using android-platform-tools
Using artpip
Using atom
Using boom-3d
Using carbon-copy-cloner
Using cheatsheet
Using codekit
Using controlplane
Using cyberduck
Using darktable
Using disk-drill
Using flux
Using font-abel
Using font-aboriginal-sans
Using font-aboriginal-serif
Using font-african-sans
Using font-african-serif
Using font-anonymice-powerline
Using font-input
Using font-inter-ui
Using fork
Using hazel3
Using horndis
Using iina
Using iterm2-nightly
Using itsycal
Using knockknock
Using libreoffice
Using pdf-expert
Using platypus
Using qlcolorcode
Using qlmarkdown
Using qlprettypatch
Using qlstephen
Using quicksilver
Using signal
Using sketchup
Using soduto
Using transmission
Using vivaldi
Using ynab
Using Affinity Designer
Using Affinity Photo
Using Amphetamine
Using DaVinci Resolve
Using GarageBand
Using GIF Brewery 3
Using GIPHY CAPTURE
Using InfoSlips Viewer
Using Keynote
Using Pages
Using TokenLock
Using Xcode
Homebrew Bundle complete! 88 Brewfile dependencies now installed.

View file

@ -1,66 +0,0 @@
#!/bin/sh
# This script updates brew, brew cask apps, ruby gems, rvm, npm packages and macOS (including system software) Apps.
# Version 6.3 (23 September, 2018)
# Function: Reviews the last command for errors. Then prints update complete to log or shows error dialog. Takes section variable.
catcher () {
if [ "$?" = "0" ]; then
printf "$1 updates complete." >> ~/Projects/Programming/macupdater/macupdater-log.txt # If no error, print update complete to file.
printf "" >> ~/Projects/Programming/macupdater/macupdater-log.txt # Add a line to file.
else # If error, show a dialog stating the section where the error occured.
osascript -e 'display notification "'$1': Script encountered errors." with title "MacUpdater"'
fi
}
# Function: Creates a horizontal line in the text file.
line () {
echo "" >> ~/Projects/Programming/macupdater/macupdater-log.txt # Starts the horizontal line on its own fresh line.
printf '%*s\n' "${COLUMNS:-$(tput cols)}" '' | tr ' ' - >> ~/Projects/Programming/macupdater/macupdater-log.txt # Prints line
}
# Writes the header for the log file: Program, Version number, Date and Line.
{ echo "macupdater 6.0"; echo "Log: " `date`; line; } > ~/Projects/Programming/macupdater/macupdater-log.txt
# Brew update commands.
{ echo "Brew"; echo ""; brew update; brew bundle dump --force; brew bundle -verbose; brew cleanup; brew prune; } >> ~/Projects/Programming/macupdater/macupdater-log.txt
catcher Brew
line
# Brew-cask update commands. Functionality replaced by brew bundle.
# { echo "Brew Cask"; echo ""; brew cu -ay --cleanup; brew cask cleanup; } >> ~/Projects/Programming/macupdater/macupdater-log.txt
# catcher Brew-cask
# line
# App Store update commands. Functionality replaced by brew bundle.
# { echo "Apps"; echo ""; mas upgrade; } >> ~/Projects/Programming/macupdater/macupdater-log.txt
# catcher Apps
# Node update commands.
{ echo "Node"; echo ""; npm install npm@latest -g --silent; npm update --silent; npm prune --silent; } >> ~/Projects/Programming/macupdater/macupdater-log.txt
catcher Node
line
# Ruby update commands. Commented out RVM update (takes too long and not necessary).
# { rvm get latest; } >> ~/Projects/Programming/macupdater/macupdater-log.txt
# rvm cleanup all (don't need this for now)
{ echo "Ruby"; echo ""; ; gem update --system; gem update; gem cleanup; } >> ~/Projects/Programming/macupdater/macupdater-log.txt
catcher Ruby
line
# Perl update commands. Commented out (don;t need uopdated Perl at the moment)
# { echo "Perl"; echo ""; perlbrew upgrade-perl; perlbrew self-upgrade --silent; perlbrew clean; } >> ~/Projects/Programming/macupdater/macupdater-log.txt
# catcher Perl
# line
# System software update commads.
{ echo "macOS"; echo ""; softwareupdate -ia; } >> ~/Projects/Programming/macupdater/macupdater-log.txt
catcher macOS
line
echo "" >> ~/Projects/Programming/macupdater/macupdater-log.txt
line
# Prints and shows dialog box confirming all updates are done.
printf "All updates complete. END" >> ~/Projects/Programming/macupdater/macupdater-log.txt
osascript -e 'display notification "All updates completed." with title "MacUpdater"'

View file

@ -1,6 +1,9 @@
#!/bin/sh #!/Users/gugulethu/brew/bin/zsh
# This script updates brew, brew cask apps, ruby gems, rvm, npm packages and macOS (including system software) Apps.
# Version 6.3 (23 September, 2018) # This script updates brew, brew cask apps, apm packages, ruby gems, rvm, npm packages and macOS (including system software) Apps.
# Version 6.5 (6 October, 2018)
osascript -e 'display notification "Updater starting..." with title "MacUpdater"'
# Function: Reviews the last command for errors. Then prints update complete to log or shows error dialog. Takes section variable. # Function: Reviews the last command for errors. Then prints update complete to log or shows error dialog. Takes section variable.
catcher () { catcher () {
@ -8,7 +11,7 @@ if [ "$?" = "0" ]; then
printf "$1 updates complete." >> ~/Projects/Programming/macupdater/macupdater-log.txt # If no error, print update complete to file. printf "$1 updates complete." >> ~/Projects/Programming/macupdater/macupdater-log.txt # If no error, print update complete to file.
printf "" >> ~/Projects/Programming/macupdater/macupdater-log.txt # Add a line to file. printf "" >> ~/Projects/Programming/macupdater/macupdater-log.txt # Add a line to file.
else # If error, show a dialog stating the section where the error occured. else # If error, show a dialog stating the section where the error occured.
osascript -e 'display notification "'$1': Script encountered errors." with title "MacUpdater"' osascript -e 'display notification "'$1': Script encountered errors." with title "MacUpdater"'
fi fi
} }
@ -47,6 +50,11 @@ line
catcher Ruby catcher Ruby
line line
# Atom update commands.
{ echo "Atom"; echo ""; apm update; apm upgrade; apm prune; } >> ~/Projects/Programming/macupdater/macupdater-log.txt
catcher Atom
line
# Perl update commands. Commented out (don;t need uopdated Perl at the moment) # Perl update commands. Commented out (don;t need uopdated Perl at the moment)
# { echo "Perl"; echo ""; perlbrew upgrade-perl; perlbrew self-upgrade --silent; perlbrew clean; } >> ~/Projects/Programming/macupdater/macupdater-log.txt # { echo "Perl"; echo ""; perlbrew upgrade-perl; perlbrew self-upgrade --silent; perlbrew clean; } >> ~/Projects/Programming/macupdater/macupdater-log.txt
# catcher Perl # catcher Perl
@ -63,4 +71,6 @@ line
# Prints and shows dialog box confirming all updates are done. # Prints and shows dialog box confirming all updates are done.
printf "All updates complete. END" >> ~/Projects/Programming/macupdater/macupdater-log.txt printf "All updates complete. END" >> ~/Projects/Programming/macupdater/macupdater-log.txt
osascript -e 'display notification "All updates completed." with title "MacUpdater"' osascript -e 'display notification "All updates completed." with title "MacUpdater"'
exit 0

13
readme.md Normal file
View file

@ -0,0 +1,13 @@
# MacUpdater
This script updates brew, brew cask apps, apm packages, ruby gems, rvm, npm packages and macOS (including system software) Apps.
## Dependencies
brew : *https://brew.sh/*
apm: *Atom package manager*
npm: *brew install node*
mas: *brew install mas*
## Notes
Editing teh script requires some scripting know how, but it is well documented.