texlive[62795] Master/texmf-dist/scripts/tlshell/tlshell.tcl: Handle
commits+siepo at tug.org
commits+siepo at tug.org
Fri Mar 18 22:44:03 CET 2022
Revision: 62795
http://tug.org/svn/texlive?view=revision&revision=62795
Author: siepo
Date: 2022-03-18 22:44:03 +0100 (Fri, 18 Mar 2022)
Log Message:
-----------
Handle -h[elp] parameter
Modified Paths:
--------------
trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl
Modified: trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl
===================================================================
--- trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl 2022-03-18 21:42:01 UTC (rev 62794)
+++ trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl 2022-03-18 21:44:03 UTC (rev 62795)
@@ -1,10 +1,10 @@
#!/bin/sh
# next line ignored by wish but not by sh \
-TK_SILENCE_DEPRECATION=1 exec wish "$0" "$@"
+TK_SILENCE_DEPRECATION=1 exec wish "$0" -- "$@"
# The above environment variable is set to suppress
# a warning message under MacOS Catalina and Big Sur
-# Copyright 2017-2021 Siep Kroonenberg
+# Copyright 2017-2022 Siep Kroonenberg
# This file is licensed under the GNU General Public License version 2
# or any later version.
@@ -2285,7 +2285,7 @@
}
proc about_cmd {} {
- set msg "\u00a9 2017-2021 Siep Kroonenberg\n\n"
+ set msg "\u00a9 2017-2022 Siep Kroonenberg\n\n"
append msg [__ "GUI interface for TeX Live Manager\nImplemented in Tcl/Tk"]
tk_messageBox -message $msg
}
@@ -3088,6 +3088,22 @@
Are you sure you want to continue?" $::instroot]]
if {$ans ne "yes"} {exit}
}
+ # handle -h[elp] and -v[ersion parameters;
+ # do not pass these on to the upcoming tlmgr pipe
+ set i $::argc
+ while 1 {
+ incr i -1
+ if {$i<0} break
+ set s [lindex $::argv $i]
+ if {$s eq "-h" || $s eq "-help"} {
+ tk_messageBox -message [__ "See internal help"] \
+ -icon info -type ok
+ set ::argv [lreplace $::argv $i $i]
+ } elseif {$s eq "-v" || $s eq "-version"} {
+ set ::argv [lreplace $::argv $i $i]
+ }
+ }
+ set ::argc [llength $::argv]
start_tlmgr {*}$::argv
if {$::tcl_platform(platform) eq "windows"} {
More information about the tex-live-commits
mailing list.