Skip to content

Commit

Permalink
Display upgrade message on ⌘Q for outdated versions
Browse files Browse the repository at this point in the history
Because of an error in the upgrade mechanism of a recent nightly build it would not check for updates for the application but would still check for bundle updates. This command will prompt users with outdated versions to check manually for an update.
  • Loading branch information
infininight committed Apr 3, 2013
1 parent 7eed647 commit ddb2f62
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
39 changes: 39 additions & 0 deletions Commands/Update Notification.tmCommand
@@ -0,0 +1,39 @@
<?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>beforeRunningCommand</key>
<string>nop</string>
<key>command</key>
<string>#!/bin/bash
: "${TM_APP_PATH:=/Applications/TextMate.app}"
{ if [[ -d "$TM_APP_PATH" &amp;&amp; $(defaults read "$TM_APP_PATH/Contents/Info" CFBundleVersion) -lt 9409 ]]; then
exec "$DIALOG" alert --title "Update Available" --body "You should go to Preferences → Software Update and Check Now" --button1 OK
fi
osascript -e "tell app \"$(basename "$TM_APP_PATH")\" to quit"
} &amp;&gt;/dev/null &amp;</string>
<key>input</key>
<string>none</string>
<key>inputFormat</key>
<string>text</string>
<key>keyEquivalent</key>
<string>@q</string>
<key>name</key>
<string>Update Notification</string>
<key>outputCaret</key>
<string>afterOutput</string>
<key>outputFormat</key>
<string>text</string>
<key>outputLocation</key>
<string>discard</string>
<key>scope</key>
<string>-attr.os-version.10.6</string>
<key>uuid</key>
<string>615998FE-A13B-4199-A670-E5A892A1C43A</string>
<key>version</key>
<integer>2</integer>
</dict>
</plist>
4 changes: 4 additions & 0 deletions info.plist
Expand Up @@ -10,6 +10,10 @@
<string>This bundle has functionality which add to the application but is not related to a specific task (bundle).</string>
<key>mainMenu</key>
<dict>
<key>excludedItems</key>
<array>
<string>615998FE-A13B-4199-A670-E5A892A1C43A</string>
</array>
<key>items</key>
<array>
<string>6E779E48-F146-49BF-B60C-EFDFD1380772</string>
Expand Down

0 comments on commit ddb2f62

Please sign in to comment.