diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:49:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 09:49:36 +0000 |
commit | 5ec6074f0633939fd17d94111d10c6c6b062978c (patch) | |
tree | bfaa17b5a64abc66c918e9c70969e519d9e1df8e /git-gui/windows/git-gui.sh | |
parent | Initial commit. (diff) | |
download | git-upstream.tar.xz git-upstream.zip |
Adding upstream version 1:2.30.2.upstream/1%2.30.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | git-gui/windows/git-gui.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/git-gui/windows/git-gui.sh b/git-gui/windows/git-gui.sh new file mode 100755 index 0000000..b1845c5 --- /dev/null +++ b/git-gui/windows/git-gui.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# Tcl ignores the next line -*- tcl -*- \ +exec wish "$0" -- "$@" + +if { $argc >=2 && [lindex $argv 0] == "--working-dir" } { + set workdir [lindex $argv 1] + cd $workdir + if {[lindex [file split $workdir] end] eq {.git}} { + # Workaround for Explorer right click "Git GUI Here" on .git/ + cd .. + } + set argv [lrange $argv 2 end] + incr argc -2 +} + +set basedir [file dirname \ + [file dirname \ + [file dirname [info script]]]] +set bindir [file join $basedir bin] +set bindir "$bindir;[file join $basedir mingw bin]" +regsub -all ";" $bindir "\\;" bindir +set env(PATH) "$bindir;$env(PATH)" +unset bindir + +source [file join [file dirname [info script]] git-gui.tcl] |