texlive[51579] Master: Add -nocomplain to glob to make it accept

commits+siepo at tug.org commits+siepo at tug.org
Mon Jul 8 21:09:16 CEST 2019


Revision: 51579
          http://tug.org/svn/texlive?view=revision&revision=51579
Author:   siepo
Date:     2019-07-08 21:09:16 +0200 (Mon, 08 Jul 2019)
Log Message:
-----------
Add -nocomplain to glob to make it accept empty directories

Modified Paths:
--------------
    trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl
    trunk/Master/tlpkg/installer/install-tl-gui.tcl
    trunk/Master/tlpkg/tltcl/tltcl.tcl

Modified: trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl
===================================================================
--- trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl	2019-07-08 17:37:34 UTC (rev 51578)
+++ trunk/Master/texmf-dist/scripts/tlshell/tlshell.tcl	2019-07-08 19:09:16 UTC (rev 51579)
@@ -1434,7 +1434,7 @@
   }
   set pwd0 [pwd]
   cd $bdir
-  set backups [lsort [glob *.tar.xz]]
+  set backups [lsort [glob -nocomplain *.tar.xz]]
   if {[llength $backups] == 0} {
     tk_messageBox -message [__ "No backups found in $bdir"]
     return

Modified: trunk/Master/tlpkg/installer/install-tl-gui.tcl
===================================================================
--- trunk/Master/tlpkg/installer/install-tl-gui.tcl	2019-07-08 17:37:34 UTC (rev 51578)
+++ trunk/Master/tlpkg/installer/install-tl-gui.tcl	2019-07-08 19:09:16 UTC (rev 51579)
@@ -98,7 +98,7 @@
 
 proc is_nonempty {td} {
   if {! [file exists $td]} {return 0}
-  return [expr {[llength [glob -directory $td *]] > 0}]
+  return [expr {[llength [glob -nocomplain -directory $td *]] > 0}]
 }
 
 proc td_warn {td} {

Modified: trunk/Master/tlpkg/tltcl/tltcl.tcl
===================================================================
--- trunk/Master/tlpkg/tltcl/tltcl.tcl	2019-07-08 17:37:34 UTC (rev 51578)
+++ trunk/Master/tlpkg/tltcl/tltcl.tcl	2019-07-08 19:09:16 UTC (rev 51579)
@@ -180,7 +180,8 @@
     set s [lindex $::argv $i]
     if {[string range $s 0 1] eq "--"} {
       set s [string range $s 1 end]
-      set ::argv [lreplace $::argv $i $i $s]
+      #set ::argv [lreplace $::argv $i $i $s]
+      lset ::argv $i $s
     }
     set j [string first "=" $s]
     if {$j > 0} {
@@ -257,7 +258,7 @@
     set maybe ""
     set ::lang [string tolower $::lang]
     set tdir [file join $::instroot "tlpkg" "translations"]
-    foreach f [glob -directory $tdir *.po] {
+    foreach f [glob -nocomplain -directory $tdir *.po] {
       set ln_f [string tolower [string range [file tail $f] 0 end-3]]
       if {$ln_f eq $::lang} {
         set messcat $f
@@ -530,7 +531,7 @@
 
 if {$::tcl_platform(platform) eq "unix"} {
 
-  # Based on the tcl/tk widget demo.
+  # Based on the directory browser from the tcl/tk widget demo.
   # Also for MacOS, because we want to see /usr.
   # For windows, the native browser widget is better.
 



More information about the tex-live-commits mailing list