From ddb2f620248be877f3bd2de47b374e9e3112fb9d Mon Sep 17 00:00:00 2001 From: Michael Sheets Date: Wed, 3 Apr 2013 17:44:21 -0500 Subject: [PATCH] =?UTF-8?q?Display=20upgrade=20message=20on=20=E2=8C=98Q?= =?UTF-8?q?=20for=20outdated=20versions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- Commands/Update Notification.tmCommand | 39 ++++++++++++++++++++++++++ info.plist | 4 +++ 2 files changed, 43 insertions(+) create mode 100644 Commands/Update Notification.tmCommand diff --git a/Commands/Update Notification.tmCommand b/Commands/Update Notification.tmCommand new file mode 100644 index 0000000..b34aa91 --- /dev/null +++ b/Commands/Update Notification.tmCommand @@ -0,0 +1,39 @@ + + + + + beforeRunningCommand + nop + command + #!/bin/bash +: "${TM_APP_PATH:=/Applications/TextMate.app}" + +{ if [[ -d "$TM_APP_PATH" && $(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" + +} &>/dev/null & + input + none + inputFormat + text + keyEquivalent + @q + name + Update Notification + outputCaret + afterOutput + outputFormat + text + outputLocation + discard + scope + -attr.os-version.10.6 + uuid + 615998FE-A13B-4199-A670-E5A892A1C43A + version + 2 + + diff --git a/info.plist b/info.plist index 3f3335c..aaf0cfb 100644 --- a/info.plist +++ b/info.plist @@ -10,6 +10,10 @@ This bundle has functionality which add to the application but is not related to a specific task (bundle). mainMenu + excludedItems + + 615998FE-A13B-4199-A670-E5A892A1C43A + items 6E779E48-F146-49BF-B60C-EFDFD1380772