diff --git a/macupdater-log.txt b/macupdater-log.txt index 8c9e6a0..a175705 100644 --- a/macupdater-log.txt +++ b/macupdater-log.txt @@ -1,48 +1,130 @@ macupdater 6.0 -Log: Sun Sep 23 01:04:58 SAST 2018 - +Log: Sat Oct 6 13:26:11 SAST 2018 +------------------------------------------------------------------------------------- Brew -Updated 1 tap (homebrew/cask). -Brew updates complete. - -Node - -/Users/gugulethu/homebrew/bin/npm -> /Users/gugulethu/homebrew/lib/node_modules/npm/bin/npm-cli.js -/Users/gugulethu/homebrew/bin/npx -> /Users/gugulethu/homebrew/lib/node_modules/npm/bin/npx-cli.js -+ npm@6.4.1 -updated 1 package in 13.285s -up to date in 2.621s -found 0 vulnerabilities - -Node updates complete. - -Ruby - -Updating rubygems-update -Updating installed gems -Updating CFPropertyList -Cleaning up installed gems... -Clean Up Complete -Ruby updates complete. - -Perl - -no perlbrew environment is currently in use -Your perlbrew is up-to-date. - -Done -Perl updates complete. - -macOS - -Software Update Tool - -Finding available software -macOS updates complete. - - - - -All updates complete. END \ No newline at end of file +Already up-to-date. +Skipping install of buo/cask-upgrade tap. It is already installed. +Using buo/cask-upgrade +Skipping install of homebrew/bundle tap. It is already installed. +Using homebrew/bundle +Skipping install of homebrew/cask tap. It is already installed. +Using homebrew/cask +Skipping install of homebrew/cask-fonts tap. It is already installed. +Using homebrew/cask-fonts +Skipping install of homebrew/cask-versions tap. It is already installed. +Using homebrew/cask-versions +Skipping install of homebrew/core tap. It is already installed. +Using homebrew/core +Skipping install of openssl formula. It is already up-to-date. +Using openssl +Skipping install of bash formula. It is already up-to-date. +Using bash +Skipping install of bash-completion formula. It is already up-to-date. +Using bash-completion +Skipping install of bash-git-prompt formula. It is already up-to-date. +Using bash-git-prompt +Skipping install of coreutils formula. It is already up-to-date. +Using coreutils +Skipping install of curl formula. It is already up-to-date. +Using curl +Skipping install of ffmpeg formula. It is already up-to-date. +Using ffmpeg +Skipping install of freetype formula. It is already up-to-date. +Using freetype +Skipping install of git formula. It is already up-to-date. +Using git +Skipping install of gnupg formula. It is already up-to-date. +Using gnupg +Skipping install of imagemagick formula. It is already up-to-date. +Using imagemagick +Skipping install of mackup formula. It is already up-to-date. +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 +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. diff --git a/macupdater.command b/macupdater.command deleted file mode 100644 index 1337c6e..0000000 --- a/macupdater.command +++ /dev/null @@ -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"' \ No newline at end of file diff --git a/macupdater.sh b/macupdater.sh index 1337c6e..a203219 100755 --- a/macupdater.sh +++ b/macupdater.sh @@ -1,6 +1,9 @@ -#!/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) +#!/Users/gugulethu/brew/bin/zsh + +# 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. 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 "" >> ~/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"' + osascript -e 'display notification "'$1': Script encountered errors." with title "MacUpdater"' fi } @@ -47,6 +50,11 @@ line catcher Ruby 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) # { echo "Perl"; echo ""; perlbrew upgrade-perl; perlbrew self-upgrade --silent; perlbrew clean; } >> ~/Projects/Programming/macupdater/macupdater-log.txt # catcher Perl @@ -63,4 +71,6 @@ 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"' \ No newline at end of file +osascript -e 'display notification "All updates completed." with title "MacUpdater"' + +exit 0 diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..f43495d --- /dev/null +++ b/readme.md @@ -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.