diff options
author | Siep Kroonenberg <siepo@cybercomm.nl> | 2022-03-18 21:44:03 +0000 |
---|---|---|
committer | Siep Kroonenberg <siepo@cybercomm.nl> | 2022-03-18 21:44:03 +0000 |
commit | 11e8f94356b2aa7be495a33cdee991d01949d17d (patch) | |
tree | fa8ed83211ee7d7e7ad17bf66481b5b58489792b /Master/texmf-dist/scripts/tlshell | |
parent | 7bd6a757fb3e108777ca9bfda5985f31aa0ebf58 (diff) |
Handle -h[elp] parameter
git-svn-id: svn://tug.org/texlive/trunk@62795 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/tlshell')
-rwxr-xr-x | Master/texmf-dist/scripts/tlshell/tlshell.tcl | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/tlshell/tlshell.tcl b/Master/texmf-dist/scripts/tlshell/tlshell.tcl index e84a6d2af7e..a86ecdf33da 100755 --- a/Master/texmf-dist/scripts/tlshell/tlshell.tcl +++ b/Master/texmf-dist/scripts/tlshell/tlshell.tcl @@ -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 run_external {cmd {mess ""}} { } 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 @@ proc initialize {} { 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"} { |