aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2011-05-15 11:48:48 +0300
committerFilipp Lepalaan <filipp@mac.com>2011-05-15 11:48:48 +0300
commit34ec6a19c62892911c39d1d205de2ecb80c2adfc (patch)
tree8b6102f00a4042769040d21126eaa114e60e4730
parentb74a04eedaeba86926953e346754814e1f956a62 (diff)
downloadmtk-34ec6a19c62892911c39d1d205de2ecb80c2adfc.tar.gz
mtk-34ec6a19c62892911c39d1d205de2ecb80c2adfc.tar.bz2
mtk-34ec6a19c62892911c39d1d205de2ecb80c2adfc.zip
added up2date
-rw-r--r--aptest.app/Contents/Resources/Scripts/main.scptbin3512 -> 3512 bytes
-rw-r--r--up2date.scptd/Contents/Info.plist21
-rw-r--r--up2date.scptd/Contents/Resources/Scripts/main.scptbin0 -> 1748 bytes
-rw-r--r--up2date.scptd/Contents/Resources/description.rtfd/TXT.rtf4
-rwxr-xr-xup2date.scptd/Contents/Resources/up2date.sh (renamed from up2date.sh)9
5 files changed, 30 insertions, 4 deletions
diff --git a/aptest.app/Contents/Resources/Scripts/main.scpt b/aptest.app/Contents/Resources/Scripts/main.scpt
index cc1c22a..7e0dd07 100644
--- a/aptest.app/Contents/Resources/Scripts/main.scpt
+++ b/aptest.app/Contents/Resources/Scripts/main.scpt
Binary files differ
diff --git a/up2date.scptd/Contents/Info.plist b/up2date.scptd/Contents/Info.plist
new file mode 100644
index 0000000..c23a467
--- /dev/null
+++ b/up2date.scptd/Contents/Info.plist
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>WindowState</key>
+ <dict>
+ <key>dividerCollapsed</key>
+ <false/>
+ <key>eventLogLevel</key>
+ <integer>-1</integer>
+ <key>name</key>
+ <string>ScriptWindowState</string>
+ <key>positionOfDivider</key>
+ <real>346</real>
+ <key>savedFrame</key>
+ <string>77 104 824 602 0 0 1440 878 </string>
+ <key>selectedTabView</key>
+ <string>result</string>
+ </dict>
+</dict>
+</plist>
diff --git a/up2date.scptd/Contents/Resources/Scripts/main.scpt b/up2date.scptd/Contents/Resources/Scripts/main.scpt
new file mode 100644
index 0000000..5479faa
--- /dev/null
+++ b/up2date.scptd/Contents/Resources/Scripts/main.scpt
Binary files differ
diff --git a/up2date.scptd/Contents/Resources/description.rtfd/TXT.rtf b/up2date.scptd/Contents/Resources/description.rtfd/TXT.rtf
new file mode 100644
index 0000000..33192ea
--- /dev/null
+++ b/up2date.scptd/Contents/Resources/description.rtfd/TXT.rtf
@@ -0,0 +1,4 @@
+{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350
+{\fonttbl}
+{\colortbl;\red255\green255\blue255;}
+} \ No newline at end of file
diff --git a/up2date.sh b/up2date.scptd/Contents/Resources/up2date.sh
index 3e27f4f..c917e81 100755
--- a/up2date.sh
+++ b/up2date.scptd/Contents/Resources/up2date.sh
@@ -15,8 +15,8 @@ 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
+ 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">
@@ -32,15 +32,16 @@ then
</dict>
</plist>
EOT
- /bin/launchctl load -w $PLIST
+ /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) unloaded"
+/usr/bin/logger "$(basename $0) finished, script unloaded. Have a nice day."
exit 0