diff options
Diffstat (limited to 'up2date.scptd/Contents/Resources')
-rw-r--r-- | up2date.scptd/Contents/Resources/Scripts/main.scpt | bin | 1748 -> 0 bytes | |||
-rw-r--r-- | up2date.scptd/Contents/Resources/description.rtfd/TXT.rtf | 4 | ||||
-rwxr-xr-x | up2date.scptd/Contents/Resources/up2date.sh | 47 |
3 files changed, 0 insertions, 51 deletions
diff --git a/up2date.scptd/Contents/Resources/Scripts/main.scpt b/up2date.scptd/Contents/Resources/Scripts/main.scpt Binary files differdeleted file mode 100644 index 5479faa..0000000 --- a/up2date.scptd/Contents/Resources/Scripts/main.scpt +++ /dev/null diff --git a/up2date.scptd/Contents/Resources/description.rtfd/TXT.rtf b/up2date.scptd/Contents/Resources/description.rtfd/TXT.rtf deleted file mode 100644 index 33192ea..0000000 --- a/up2date.scptd/Contents/Resources/description.rtfd/TXT.rtf +++ /dev/null @@ -1,4 +0,0 @@ -{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 -{\fonttbl} -{\colortbl;\red255\green255\blue255;} -}
\ No newline at end of file diff --git a/up2date.scptd/Contents/Resources/up2date.sh b/up2date.scptd/Contents/Resources/up2date.sh deleted file mode 100755 index c917e81..0000000 --- a/up2date.scptd/Contents/Resources/up2date.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env bash -# up2date.sh -# Run software update until there are no more updates available. -# @author Filipp Lepalaan -# @package mtk - -if [[ $USER != "root" ]]; then - echo "$(basename $0) must be run as root" 2>&1 - exit 1 -fi - -ME=$0 -PLIST=/Library/LaunchDaemons/com.unflyingobject.mtk.up2date.plist - -# updates available... -if /usr/sbin/softwareupdate -l 2>&1 | grep -q 'found the following new' -then - if [[ ! -e "${PLIST}" ]]; then - cat > "${PLIST}" <<EOT -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> - <dict> - <key>RunAtLoad</key> - <true/> - <key>Label</key> - <string>com.unflyingobject.mtk.up2date</string> - <key>ProgramArguments</key> - <array> - <string>${ME}</string> - </array> - </dict> -</plist> -EOT - /bin/launchctl load -w "${PLIST}" - /usr/bin/logger "$(basename $0) loaded" - exit 0 - fi - /usr/bin/open /var/log/system.log - /usr/sbin/softwareupdate -ia && /sbin/reboot - exit 0 -fi - -# no more updates available -/bin/launchctl unload -w "${PLIST}" && rm "${PLIST}" -/usr/bin/logger "$(basename $0) finished, script unloaded. Have a nice day." -exit 0 |