Last active
November 22, 2024 06:57
-
-
Save yuya-maemichi-synspective/582a9a0383779c5154cd0c346fdab2eb to your computer and use it in GitHub Desktop.
macOS software update
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
softwareupdate --fetch-full-installer --full-installer-version '13.6' && | |
open '/Applications/Install macOS Ventura.app' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%x[softwareupdate --list] | |
.sub(/^[^:]*:\s*/,'') | |
.gsub(/\n\t/, ', ') | |
.split(/\n/) | |
.map{ | |
_1 | |
.scan(/(?<key>[^: ]+):\s*(?<value>[^,]+),\s*/) | |
.to_h | |
.transform_keys(&:to_sym)} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
softwareupdate --list-full-installers | | |
sed 1,2d | | |
ruby -pe '$_=$_.strip.scan(/\W (\w+): ([\w .]+)/i).to_h.then{"%s %s-%s" % _1.values_at("Title","Version","Build")}+$/' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
softwareupdate --list --no-scan | | |
sed '/Software Update Tool/,/Software Update [^:]*:/d;/ Label: /N;/\t/s!\n\t!, !' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
softwareupdate --list | | |
grep -E 'Label: Safari|Title: Safari,' && | |
softwareupdate --install --safari-only |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ref. https://ss64.com/mac/softwareupdate.html
help: https://gist.github.com/applch/6481662b190ba7a2a80d2d7a0eaf1423#file-softwareupdate