-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-gui: add mingw specific startup wrapper
The wrapper adds the directory it is installed in to PATH. This is required for the git commands implemented in shell. git-gui fails to launch them if PATH is not modified. The wrapper script also accepts an optional command line switch '--working-dir <dir>' and changes to <dir> before launching the actual git-gui. This is required to implement the "Git Gui Here" Explorer shell extension. As a last step the original git-gui script is launched, which is expected to be located in the same directory under the name git-gui.tcl. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
- Loading branch information
Steffen Prohaska
authored and
Shawn O. Pearce
committed
Oct 10, 2007
1 parent
a16b74e
commit 99fe594
Showing
2 changed files
with
36 additions
and
0 deletions.
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
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,16 @@ | ||
#!/bin/sh | ||
# Tcl ignores the next line -*- tcl -*- \ | ||
exec wish "$0" -- "$@" | ||
|
||
if { $argc >=2 && [lindex $argv 0] == "--working-dir" } { | ||
cd [lindex $argv 1] | ||
set argv [lrange $argv 2 end] | ||
incr argc -2 | ||
} | ||
|
||
set gitguidir [file dirname [info script]] | ||
regsub -all ";" $gitguidir "\\;" gitguidir | ||
set env(PATH) "$gitguidir;$env(PATH)" | ||
unset gitguidir | ||
source [file join [file dirname [info script]] git-gui.tcl] |