Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NEW] Apply Patch to Arbitrary Files command.
git-svn-id: http://svn.textmate.org/trunk/Bundles/Diff.tmbundle@4662 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
- Loading branch information
Chris Thomas
committed
Aug 10, 2006
1 parent
e144882
commit 267aa0d
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?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>beforeRunningCommand</key> | ||
<string>nop</string> | ||
<key>command</key> | ||
<string># patch may be the most brainfucked standard Unix tool ever. Make sure it doesn't try to access the network (it tends to ignore the -g option, I find) -- if you have Perforce installed, this can be a huge performance hit -- and it touches the network even for files that aren't controlled by Perforce. All files on the system get the lovely 'is this file locked'? treatment. Software tools, huh? | ||
export PATCH_GET=0 | ||
path=$(osascript<<END | ||
tell application "TextMate" | ||
set theFile to choose folder with prompt "Where should I look for files to be patched?" | ||
set the result to POSIX path of theFile | ||
end tell | ||
END) | ||
if [[ -z $path ]]; then | ||
exit_discard | ||
else | ||
patch -d "$path" < "$TM_FILEPATH" | ||
fi | ||
</string> | ||
<key>input</key> | ||
<string>document</string> | ||
<key>keyEquivalent</key> | ||
<string>^@D</string> | ||
<key>name</key> | ||
<string>Apply Patch to Files…</string> | ||
<key>output</key> | ||
<string>showAsTooltip</string> | ||
<key>uuid</key> | ||
<string>54D1CEF2-10AB-407B-AAB2-6AEA06B297B1</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters