Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
61 lines (53 sloc) 2.04 KB
<?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>saveModifiedFiles</string>
<key>command</key>
<string>#!/usr/bin/env bash
[[ -f "${TM_SUPPORT_PATH}/lib/bash_init.sh" ]] &amp;&amp; . "${TM_SUPPORT_PATH}/lib/bash_init.sh"
# TM_IGNORE_WARNINGS is a sequence of glob patterns of files in which to ignore
# warnings. Right now it doesn't support escaped ':" -- the separator character.
# export TM_IGNORE_WARNINGS="mitchcode_*.h:*/MitchCode/*"
# Look at other bundles to see if there are conventions for using 'defaults'.
PREF_DOMAIN=com.macromates.textmate.scons_prefs
lastTarget=`defaults read ${PREF_DOMAIN} last_target`
res=$(CocoaDialog inputbox --title "Target" \
--informative-text "Build Target:" \
--text "${lastTarget}" \
--button1 "Build" --button2 "Cancel")
[[ $(head -n1 &lt;&lt;&lt;"$res") == "2" ]] &amp;&amp; exit_discard
target=""
reslines=`(wc -l &lt;&lt;&lt;"$res")|sed -e 's/ //g'`
[[ "${reslines}" == "2" ]] &amp;&amp; target=$(tail -n1 &lt;&lt;&lt;"$res")
defaults write ${PREF_DOMAIN} last_target -string "${target}"
defaults write ${PREF_DOMAIN} last_build_dir -string "${TM_DIRECTORY}"
# Allow spaces to delimit arguments in ${target} -- bad idea?
python -u "${TM_BUNDLE_SUPPORT}/bin/scons_html_wrapper.py" ${target}</string>
<key>fallbackInput</key>
<string>word</string>
<key>input</key>
<string>none</string>
<key>inputFormat</key>
<string>text</string>
<key>keyEquivalent</key>
<string>@b</string>
<key>name</key>
<string>Build...</string>
<key>outputCaret</key>
<string>afterOutput</string>
<key>outputFormat</key>
<string>html</string>
<key>outputLocation</key>
<string>newWindow</string>
<key>scope</key>
<string>attr.project.scons - (text dyn.selection)</string>
<key>semanticClass</key>
<string>process.build.scons</string>
<key>uuid</key>
<string>88F36C61-F809-4FCE-97AF-D36019891F31</string>
<key>version</key>
<integer>2</integer>
</dict>
</plist>