summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rwxr-xr-xgit-gui.sh13
2 files changed, 8 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index 9d99f67046..ab550fc6a7 100644
--- a/Makefile
+++ b/Makefile
@@ -68,7 +68,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
fi; \
fi && \
sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \
- -e 's|^exec wish "$$0"|exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' \
+ -e 's|^ exec wish "$$0"| exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' \
-e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \
-e 's|@@GITGUI_RELATIVE@@|'$$GITGUI_RELATIVE'|' \
-e $$GITGUI_RELATIVE's|@@GITGUI_LIBDIR@@|$(libdir_SQ)|' \
diff --git a/git-gui.sh b/git-gui.sh
index 97de595f27..6ee0573c98 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -1,6 +1,12 @@
#!/bin/sh
# Tcl ignores the next line -*- tcl -*- \
-exec wish "$0" -- "$@"
+ if test "z$*" = zversion \
+ || test "z$*" = z--version; \
+ then \
+ echo 'git-gui version @@GITGUI_VERSION@@'; \
+ exit; \
+ fi; \
+ exec wish "$0" -- "$@"
set appvers {@@GITGUI_VERSION@@}
set copyright {
@@ -271,11 +277,6 @@ proc tk_optionMenu {w varName args} {
##
## version check
-if {{--version} eq $argv || {version} eq $argv} {
- puts "git-gui version $appvers"
- exit
-}
-
set req_maj 1
set req_min 5