Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set theList to every paragraph of (do shell script "sudo softwareupdate -l")
- set updates to ""
- repeat with anItem in theList
- if anItem starts with " * " then
- if updates is not "" then
- set updates to updates & return
- end if
- set updates to updates & (characters 6 thru -1 of anItem)
- end if
- end repeat
- if updates is not "" then
- tell application "Finder"
- ignoring application responses
- display dialog "Software Update available:" & return & updates with title "Software Update available" buttons "OK" default button 1 with icon file ":System:Library:CoreServices:Software Update.app:Contents:Resources:Software Update.icns"
- end ignoring
- end tell
- end if
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement