texlive[53676] trunk: texosquery (4feb20)

commits+karl at tug.org commits+karl at tug.org
Tue Feb 4 23:21:35 CET 2020


Revision: 53676
          http://tug.org/svn/texlive?view=revision&revision=53676
Author:   karl
Date:     2020-02-04 23:21:35 +0100 (Tue, 04 Feb 2020)
Log Message:
-----------
texosquery (4feb20)

Modified Paths:
--------------
    trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery-jre5.sh
    trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery-jre8.sh
    trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery.sh
    trunk/Master/texmf-dist/doc/support/texosquery/CHANGES
    trunk/Master/texmf-dist/doc/support/texosquery/README.md
    trunk/Master/texmf-dist/doc/support/texosquery/texosquery.pdf
    trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre5.jar
    trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre5.sh
    trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre8.jar
    trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre8.sh
    trunk/Master/texmf-dist/scripts/texosquery/texosquery.jar
    trunk/Master/texmf-dist/scripts/texosquery/texosquery.sh
    trunk/Master/texmf-dist/source/support/texosquery/java/TeXOSQuery.java
    trunk/Master/texmf-dist/source/support/texosquery/texosquery.dtx
    trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.cfg
    trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.sty
    trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.tex

Modified: trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery-jre5.sh
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery-jre5.sh	2020-02-04 22:20:09 UTC (rev 53675)
+++ trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery-jre5.sh	2020-02-04 22:21:35 UTC (rev 53676)
@@ -1,11 +1,15 @@
 #!/bin/sh
 
 
-kernel=`uname -s`
-if test "${kernel#*CYGWIN}" != "$kernel"
-then
- jarpath=`cygpath -w $(kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar)`
-else
- jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar`
+scriptname=`basename "$0" .sh`
+jar="$scriptname.jar"
+jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"`
+
+kernel=`uname -s 2>/dev/null`
+if echo "$kernel" | grep CYGWIN >/dev/null; then
+  CYGWIN_ROOT=`cygpath -w /`
+  export CYGWIN_ROOT
+  jarpath=`cygpath -w "$jarpath"`
 fi
+
 java -jar "$jarpath" "$@"

Modified: trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery-jre8.sh
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery-jre8.sh	2020-02-04 22:20:09 UTC (rev 53675)
+++ trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery-jre8.sh	2020-02-04 22:21:35 UTC (rev 53676)
@@ -1,11 +1,15 @@
 #!/bin/sh
 
 
-kernel=`uname -s`
-if test "${kernel#*CYGWIN}" != "$kernel"
-then
- jarpath=`cygpath -w $(kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar)`
-else
- jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar`
+scriptname=`basename "$0" .sh`
+jar="$scriptname.jar"
+jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"`
+
+kernel=`uname -s 2>/dev/null`
+if echo "$kernel" | grep CYGWIN >/dev/null; then
+  CYGWIN_ROOT=`cygpath -w /`
+  export CYGWIN_ROOT
+  jarpath=`cygpath -w "$jarpath"`
 fi
+
 java -Djava.locale.providers=CLDR,JRE -jar "$jarpath" "$@"

Modified: trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery.sh
===================================================================
--- trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery.sh	2020-02-04 22:20:09 UTC (rev 53675)
+++ trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery.sh	2020-02-04 22:21:35 UTC (rev 53676)
@@ -1,11 +1,15 @@
 #!/bin/sh
 
 
-kernel=`uname -s`
-if test "${kernel#*CYGWIN}" != "$kernel"
-then
- jarpath=`cygpath -w $(kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar)`
-else
- jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar`
+scriptname=`basename "$0" .sh`
+jar="$scriptname.jar"
+jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"`
+
+kernel=`uname -s 2>/dev/null`
+if echo "$kernel" | grep CYGWIN >/dev/null; then
+  CYGWIN_ROOT=`cygpath -w /`
+  export CYGWIN_ROOT
+  jarpath=`cygpath -w "$jarpath"`
 fi
+
 java -jar "$jarpath" "$@"

Modified: trunk/Master/texmf-dist/doc/support/texosquery/CHANGES
===================================================================
--- trunk/Master/texmf-dist/doc/support/texosquery/CHANGES	2020-02-04 22:20:09 UTC (rev 53675)
+++ trunk/Master/texmf-dist/doc/support/texosquery/CHANGES	2020-02-04 22:21:35 UTC (rev 53676)
@@ -1,3 +1,12 @@
+1.7 (2020/02/04):
+
+ * Renamed scratch variable to avoid conflict.
+
+ * The default version is now texosquery-jre8 since Java 7 has long
+   passed its end of life.
+
+ * Modified bash scripts to improve cygwin support.
+
 1.6 (2017/06/20):
 
  * Added new command line options:

Modified: trunk/Master/texmf-dist/doc/support/texosquery/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/support/texosquery/README.md	2020-02-04 22:20:09 UTC (rev 53675)
+++ trunk/Master/texmf-dist/doc/support/texosquery/README.md	2020-02-04 22:21:35 UTC (rev 53676)
@@ -2,6 +2,16 @@
 Cross-platform Java application to query OS information designed for use in 
 TeX's shell escape mechanism.
 
+## Licence
+
+This material is subject to the LaTeX Project Public License.
+See http://www.ctan.org/license/lppl1.3
+for the details of that license.
+
+Copyright 2016-2020 Nicola Talbot
+
+## Description
+
 The application can query the following:
 
  - locale information
@@ -320,8 +330,8 @@
 
 In addition to obeying `openin_any`, the file listing actions (such
 as `--list`) for the JRE7 and 8 variants also prohibit listing the
-contents outside of the current working directory's path. This means
-that you can't, for example, list the contents of `..` (the current
+contents outside of the current working directory's path even if `openin_any=a`.
+This means that you can't, for example, list the contents of `..` (the current
 working directory's parent) nor can you try walking the entire file
 system.  The `--walk` action additionally won't descend hidden
 directories. This extra restriction is designed to prevent malicious
@@ -410,4 +420,3 @@
 
 Author Home Page: http://www.dickimaw-books.com/
 
-License: LPPL 1.3+

Modified: trunk/Master/texmf-dist/doc/support/texosquery/texosquery.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre5.jar
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre5.sh
===================================================================
--- trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre5.sh	2020-02-04 22:20:09 UTC (rev 53675)
+++ trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre5.sh	2020-02-04 22:21:35 UTC (rev 53676)
@@ -1,11 +1,15 @@
 #!/bin/sh
 
 
-kernel=`uname -s`
-if test "${kernel#*CYGWIN}" != "$kernel"
-then
- jarpath=`cygpath -w $(kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar)`
-else
- jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar`
+scriptname=`basename "$0" .sh`
+jar="$scriptname.jar"
+jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"`
+
+kernel=`uname -s 2>/dev/null`
+if echo "$kernel" | grep CYGWIN >/dev/null; then
+  CYGWIN_ROOT=`cygpath -w /`
+  export CYGWIN_ROOT
+  jarpath=`cygpath -w "$jarpath"`
 fi
+
 java -jar "$jarpath" "$@"

Modified: trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre8.jar
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre8.sh
===================================================================
--- trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre8.sh	2020-02-04 22:20:09 UTC (rev 53675)
+++ trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre8.sh	2020-02-04 22:21:35 UTC (rev 53676)
@@ -1,11 +1,15 @@
 #!/bin/sh
 
 
-kernel=`uname -s`
-if test "${kernel#*CYGWIN}" != "$kernel"
-then
- jarpath=`cygpath -w $(kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar)`
-else
- jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar`
+scriptname=`basename "$0" .sh`
+jar="$scriptname.jar"
+jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"`
+
+kernel=`uname -s 2>/dev/null`
+if echo "$kernel" | grep CYGWIN >/dev/null; then
+  CYGWIN_ROOT=`cygpath -w /`
+  export CYGWIN_ROOT
+  jarpath=`cygpath -w "$jarpath"`
 fi
+
 java -Djava.locale.providers=CLDR,JRE -jar "$jarpath" "$@"

Modified: trunk/Master/texmf-dist/scripts/texosquery/texosquery.jar
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/scripts/texosquery/texosquery.sh
===================================================================
--- trunk/Master/texmf-dist/scripts/texosquery/texosquery.sh	2020-02-04 22:20:09 UTC (rev 53675)
+++ trunk/Master/texmf-dist/scripts/texosquery/texosquery.sh	2020-02-04 22:21:35 UTC (rev 53676)
@@ -1,11 +1,15 @@
 #!/bin/sh
 
 
-kernel=`uname -s`
-if test "${kernel#*CYGWIN}" != "$kernel"
-then
- jarpath=`cygpath -w $(kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar)`
-else
- jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar`
+scriptname=`basename "$0" .sh`
+jar="$scriptname.jar"
+jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"`
+
+kernel=`uname -s 2>/dev/null`
+if echo "$kernel" | grep CYGWIN >/dev/null; then
+  CYGWIN_ROOT=`cygpath -w /`
+  export CYGWIN_ROOT
+  jarpath=`cygpath -w "$jarpath"`
 fi
+
 java -jar "$jarpath" "$@"

Modified: trunk/Master/texmf-dist/source/support/texosquery/java/TeXOSQuery.java
===================================================================
--- trunk/Master/texmf-dist/source/support/texosquery/java/TeXOSQuery.java	2020-02-04 22:20:09 UTC (rev 53675)
+++ trunk/Master/texmf-dist/source/support/texosquery/java/TeXOSQuery.java	2020-02-04 22:21:35 UTC (rev 53676)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2016 Nicola L.C. Talbot
+    Copyright (C) 2016-2020 Nicola L.C. Talbot
     www.dickimaw-books.com
 
     This work may be distributed and/or modified under the
@@ -3836,9 +3836,10 @@
      */
    protected void version()
    {
-       System.out.println(String.format("%s %s %s", name, VERSION_NUMBER,
+       System.out.println(String.format("%s %s (%s)", name, VERSION_NUMBER,
                 VERSION_DATE));
-       System.out.println("Copyright 2016 Nicola Talbot");
+       System.out.println(String.format("Copyright 2016-%s Nicola Talbot",
+         VERSION_DATE.substring(0,4)));
        System.out.println("License LPPL 1.3+ (http://ctan.org/license/lppl1.3)");
    }
 
@@ -4614,8 +4615,8 @@
     
    public static final int DEFAULT_COMPATIBLE=2;
 
-   private static final String VERSION_NUMBER = "1.6";
-   private static final String VERSION_DATE = "2017-06-20";
+   private static final String VERSION_NUMBER = "1.7";
+   private static final String VERSION_DATE = "2020-02-04";
    private static final char BACKSLASH = '\\';
    private static final long ZERO = 0L;
 

Modified: trunk/Master/texmf-dist/source/support/texosquery/texosquery.dtx
===================================================================
--- trunk/Master/texmf-dist/source/support/texosquery/texosquery.dtx	2020-02-04 22:20:09 UTC (rev 53675)
+++ trunk/Master/texmf-dist/source/support/texosquery/texosquery.dtx	2020-02-04 22:21:35 UTC (rev 53676)
@@ -19,7 +19,7 @@
 %\fi
 % \iffalse
 % Doc-Source file
-% Copyright (C) 2017 Nicola Talbot, all rights reserved.
+% Copyright (C) 2016-2020 Nicola Talbot, all rights reserved.
 % \fi
 % \iffalse
 %<*driver>
@@ -53,7 +53,7 @@
 \renewcommand{\meta at font@select}{\rmfamily\itshape}
 \makeatother
 
-\CheckSum{3469}
+\CheckSum{3472}
 
 \RecordChanges
 \PageIndex
@@ -127,7 +127,7 @@
 %\author{Nicola L. C. Talbot\\
 %\href{http://www.dickimaw-books.com/}{\nolinkurl{dickimaw-books.com}}
 %\and Paulo Cereda}
-%\date{2017-06-20 (v1.6)}
+%\date{2020-02-04 (v1.7)}
 %\maketitle
 %
 %\begin{abstract}
@@ -170,9 +170,9 @@
 %\href{http://www.oracle.com/technetwork/java/eol-135779.html}{end
 %of life and is now deprecated}.
 %\item \file{texosquery-jre8.jar}: requires at least Java~8, has best locale
-%support, obeys \texttt{openin\_any} but has additional
+%support, is on \TeX\ Live's restricted list, obeys \texttt{openin\_any} but has additional
 %restrictions imposed for security reasons (no listings outside the
-%current working directory path);
+%current working directory path); 
 %\item \file{texosquery-jre5.jar}: requires at least Java~5, has poor locale
 %support (language scripts not recognised), doesn't have the walk
 %action, obeys \texttt{openin\_any} but doesn't have the extra restrictions of the
@@ -180,7 +180,10 @@
 %are deprecated. Old deprecated versions are considered a security
 %risk.
 %\end{itemize}
-%The default is \file{texosquery.jar}. Throughout this document
+%The default is now \file{texosquery-jre8.jar}. If you have an older
+%version of Java you will need to edit the \file{texosquery.cfg}
+%file (although, if possible, you should consider upgrading your Java version for
+%security reasons). Throughout this document
 %\app{texosquery} is used to reference the application, regardless
 %which of these three jar files you've chosen to use. See
 %section~\ref{sec:setup} for further details.
@@ -208,20 +211,18 @@
 %function to support this.  The \sty{tracklang} package has similarly added
 %\cs{TrackLanguageTag}\marg{IETF tag}.
 %
-%The \sty{locale} package occasionally referenced in this document
-%is still under development at the time of writing. The
-%\longarg{numeric}, \longarg{locale-data}, \longarg{date-time} and 
+%The \longarg{numeric}, \longarg{locale-data}, \longarg{date-time} and 
 %\longarg{time-zones} options are designed to
-%interface with the \sty{locale} package, so although
-%\sty{texosquery} and \sty{locale} will be distributed separately, 
-%version 1.2 of \app{texosquery} is being
-%developed alongside version 1.0 of the \sty{locale} package.
-%The aim of the \sty{locale} package is to use both \sty{tracklang}
+%interface with the \sty{tex-locale} package, so although
+%\sty{texosquery} and \sty{tex-locale} are distributed separately, 
+%version 1.2 of \app{texosquery} was
+%developed alongside version 1.0 of the \sty{tex-locale} package.
+%The aim of the \sty{tex-locale} package is to use both \sty{tracklang}
 %and \sty{texosquery} to automatically set up the document language.
 %For example, in the following \LaTeX\ document
 %\begin{verbatim}
 %\documentclass{article}
-%\usepackage{locale}
+%\usepackage{tex-locale}
 %\begin{document}
 %Language: \CurrentLocaleLanguageNativeName.
 %Region: \CurrentLocaleRegionNativeName.
@@ -238,7 +239,7 @@
 %\texosqueryfmtnumber{\CurrentLocaleCurrencyPattern}{1234567}{0}{0}
 %\end{document}
 %\end{verbatim}
-%the \sty{locale} package will automatically:
+%the \sty{tex-locale} package will automatically:
 %\begin{itemize}
 %\item load the \sty{textcomp} package for currency symbols (package
 %option \texttt{symbols=fontawesome} will use \sty{fontawesome}
@@ -286,9 +287,7 @@
 %\bye
 %\end{verbatim}
 %
-%So that's the reasoning behind the new v1.2 actions. Hopefully the
-%new \sty{locale} package will be uploaded to \gls{CTAN} shortly after the
-%new version of \sty{texosquery}.
+%So that's the reasoning behind the new v1.2 actions.
 %
 %\clearpage
 %\tableofcontents
@@ -1491,7 +1490,7 @@
 %the non-standalone names.
 %
 %The information supplied with this option is quite complex,
-%but it's used by the \sty{locale} package to set up all the 
+%but it's used by the \sty{tex-locale} package to set up all the 
 %required information for each locale used in the document. 
 %Any non-\gls{ASCII} characters are marked up with \cs{twrp},
 %which is locally defined by \cs{TeXOSQuery} to expand to
@@ -1621,7 +1620,7 @@
 %This is done in order to be compatible with \sty{pgfcalendar}. For
 %example, with \texttt{-D en-GB} \meta{first day} is 0 (Monday), but
 %with \texttt{pt-BR} \meta{first day} is 6 (Sunday). The
-%\sty{locale} package provides a way of converting the index to
+%\sty{tex-locale} package provides a way of converting the index to
 %Monday=1 or Sunday=1 indexing.
 %
 %\item \meta{date pattern block}
@@ -2047,7 +2046,7 @@
 %\TeXOSQueryInvoker ...TeXOSInvokerName \space #1" 
 %                                                  
 %\TeXOSQuery ...noexpand #1{\TeXOSQueryInvoker {#2}
-%                                                  }}\x \fi 
+%                                                  }}\@texosquery at tmp \fi 
 %l.5 \TeXOSQuery{\result}{-b}
 %                              ^^M
 %(Press Enter to retry, or Control-D to exit)
@@ -2082,10 +2081,11 @@
 %\end{itemize}
 %
 %The \cs{TeXOSQuery} command uses \ics{TeXOSInvokerName} to reference the
-%application name. This defaults to \app{texosquery} but needs to be
+%application name. This now defaults to \app{texosquery-jre8} (as
+%from \app{texosquery} version 1.7) but needs to be
 %redefined to reflect the particular system call that's required.
 %For example, \texttt{texosquery} (Java~7) or
-%\texttt{texosquery-jre8} (Java~8). This redefinition
+%\texttt{texosquery-jre5} (Java~5). This redefinition
 %can be done in the configuration file \file{texosquery.cfg} for a
 %system-wide setting. See section~\ref{sec:setup} for further
 %details.
@@ -2663,7 +2663,7 @@
 %    \end{macrocode}
 % Version info.
 %    \begin{macrocode}
-\expandafter\def\csname ver at texosquery.tex\endcsname{2017/06/20 v1.6 (NLCT)}
+\expandafter\def\csname ver at texosquery.tex\endcsname{2020/02/04 v1.7 (NLCT)}
 %    \end{macrocode}
 %
 %\begin{macro}{\@texosquery at warn}
@@ -3928,10 +3928,11 @@
     \catcode`\;=12\relax
     \catcode`\%=12\relax
     \everyeof{\noexpand}\relax
-    \@texosquery at edef\x{\endgroup\def\noexpand#1{\TeXOSQueryInvoker{#2}}}\x
+    \@texosquery at edef\@texosquery at tmp{\endgroup\def\noexpand#1{\TeXOSQueryInvoker{#2}}}\@texosquery at tmp
   \fi
 }
 %    \end{macrocode}
+%\changes{1.7}{2020-02-04}{renamed scratch variable}
 %\end{macro}
 %
 %\begin{macro}{\TeXOSQueryFromFile}
@@ -3968,10 +3969,11 @@
       \catcode`\;=12\relax
       \catcode`\%=12\relax
       \everyeof{\noexpand}\relax
-      \@texosquery at edef\x{\endgroup\def\noexpand#1{\texosquery at input #2 }}\x
+      \@texosquery at edef\@texosquery at tmp{\endgroup\def\noexpand#1{\texosquery at input #2 }}\@texosquery at tmp
    \fi
 }
 %    \end{macrocode}
+%\changes{1.7}{2020-02-04}{renamed scratch variable}
 %\end{macro}
 %
 %
@@ -5797,9 +5799,10 @@
 \def\texosquerydefpattern#1#2{%
  \begingroup
   \@texosquery at pattern@shortcuts
-  \@texosquery at edef\x{\endgroup\def\noexpand#1{#2}}\x
+  \@texosquery at edef\@texosquery at tmp{\endgroup\def\noexpand#1{#2}}\@texosquery at tmp
 }
 %    \end{macrocode}
+%\changes{1.7}{2020-02-04}{renamed scratch variable}
 %\end{macro}
 %
 %
@@ -6663,7 +6666,7 @@
 %For example, \verb|{2}{M}| indicates the format \texttt{MM}. This
 %command tests for \cs{texosqueryfmtpat}\meta{format}, which should
 %take a single argument. If defined, that's used, otherwise use one
-%of the numeric commands defined above. The \sty{locale} package
+%of the numeric commands defined above. The \sty{tex-locale} package
 %defines \cs{texosqueryfmtpatMMM} and so on to use the locale's month names
 %etc.
 %\changes{1.2}{2017-03-23}{new}
@@ -7941,7 +7944,7 @@
 %Identify package:
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{texosquery}[2017/06/20 v1.6 (NLCT)]
+\ProvidesPackage{texosquery}[2020/02/04 v1.7 (NLCT)]
 %    \end{macrocode}
 %Load \file{texosquery.tex}:
 %    \begin{macrocode}
@@ -7955,7 +7958,9 @@
 %
 %\subsection{Configuration File (\file{texosquery.cfg})}
 %The configuration file. This will need to be edited as appropriate
-%to the system.
+%to the system. Since Java 7 end of life has long passed, this
+%now defaults to Java 8.
+%\changes{1.7}{2020-02-04}{changed the default version to texosquery-jre8}
 %\iffalse
 %    \begin{macrocode}
 %<*texosquery.cfg>
@@ -7972,27 +7977,30 @@
 % from your command line.
 
 %  * If the version number starts with "1.5" or "1.6" then
-%  \TeXOSInvokerName must be texosquery-jre5
+%    \TeXOSInvokerName must be texosquery-jre5
+%    and \TeXOSQueryAllowRestricted must be commented out
 %
 %  * If the version number starts with "1.7" then
-%  \TeXOSInvokerName must be texosquery
+%    \TeXOSInvokerName must be texosquery
+%    and \TeXOSQueryAllowRestricted must be commented out
 %
-%  * If the version number starts with "1.8" then
-%  \TeXOSInvokerName must be texosquery-jre8
+%  * If the version number starts with "1.8" or above then
+%    \TeXOSInvokerName must be texosquery-jre8
+%    and \TeXOSQueryAllowRestricted should be uncommented if
+%    texosquery-jre8 is on the restricted list. (This has been the
+%    case since TeX Live 2017.)
 
 % (bash users need to check that the .sh extension has been removed
 % from the bash scripts.)
 
-\def\TeXOSInvokerName{texosquery}
+\def\TeXOSInvokerName{texosquery-jre8}
 
 % 2. If the invoker name given in the definition above is on the 
-% restricted list, uncomment the line below to allow it to be run
-% in restricted mode:
+% restricted list, the line below should be uncommented to allow it to be run
+% in restricted mode. Otherwise comment it out.
 
-%\TeXOSQueryAllowRestricted
+\TeXOSQueryAllowRestricted
 
-% Leave it commented out if the invoker name is not on the
-% restricted list.
 %COMMENT
 %    \end{macrocode}
 %\iffalse
@@ -8015,15 +8023,20 @@
 %    \end{macrocode}
 %\fi
 %\subsubsection{\file{texosquery.sh}}
-%This now has a check for cygwin.
+%\changes{1.7}{2020-02-04}{changed bash scripts for improved cygwin support}
+%Adapted from tlcockpit.sh to ensure the script works with cygwin.
 %    \begin{macrocode}
-kernel=`uname -s`
-if test "${kernel#*CYGWIN}" != "$kernel"
-then
- jarpath=`cygpath -w $(kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar)`
-else
- jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar`
+scriptname=`basename "$0" .sh`
+jar="$scriptname.jar"
+jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"`
+
+kernel=`uname -s 2>/dev/null`
+if echo "$kernel" | grep CYGWIN >/dev/null; then
+  CYGWIN_ROOT=`cygpath -w /`
+  export CYGWIN_ROOT
+  jarpath=`cygpath -w "$jarpath"`
 fi
+
 java -jar "$jarpath" "$@" 
 %    \end{macrocode}
 %\iffalse
@@ -8039,13 +8052,17 @@
 %\fi
 %\subsubsection{\file{texosquery-jre8.sh}}
 %    \begin{macrocode}
-kernel=`uname -s`
-if test "${kernel#*CYGWIN}" != "$kernel"
-then
- jarpath=`cygpath -w $(kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar)`
-else
- jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar`
+scriptname=`basename "$0" .sh`
+jar="$scriptname.jar"
+jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"`
+
+kernel=`uname -s 2>/dev/null`
+if echo "$kernel" | grep CYGWIN >/dev/null; then
+  CYGWIN_ROOT=`cygpath -w /`
+  export CYGWIN_ROOT
+  jarpath=`cygpath -w "$jarpath"`
 fi
+
 java -Djava.locale.providers=CLDR,JRE -jar "$jarpath" "$@"
 %    \end{macrocode}
 %\iffalse
@@ -8061,13 +8078,17 @@
 %\fi
 %\subsubsection{\file{texosquery-jre5.sh}}
 %    \begin{macrocode}
-kernel=`uname -s`
-if test "${kernel#*CYGWIN}" != "$kernel"
-then
- jarpath=`cygpath -w $(kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar)`
-else
- jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar`
+scriptname=`basename "$0" .sh`
+jar="$scriptname.jar"
+jarpath=`kpsewhich --progname="$scriptname" --format=texmfscripts "$jar"`
+
+kernel=`uname -s 2>/dev/null`
+if echo "$kernel" | grep CYGWIN >/dev/null; then
+  CYGWIN_ROOT=`cygpath -w /`
+  export CYGWIN_ROOT
+  jarpath=`cygpath -w "$jarpath"`
 fi
+
 java -jar "$jarpath" "$@"
 %    \end{macrocode}
 %\iffalse

Modified: trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.cfg	2020-02-04 22:20:09 UTC (rev 53675)
+++ trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.cfg	2020-02-04 22:21:35 UTC (rev 53676)
@@ -18,27 +18,30 @@
 % from your command line.
 
 %  * If the version number starts with "1.5" or "1.6" then
-%  \TeXOSInvokerName must be texosquery-jre5
+%    \TeXOSInvokerName must be texosquery-jre5
+%    and \TeXOSQueryAllowRestricted must be commented out
 %
 %  * If the version number starts with "1.7" then
-%  \TeXOSInvokerName must be texosquery
+%    \TeXOSInvokerName must be texosquery
+%    and \TeXOSQueryAllowRestricted must be commented out
 %
-%  * If the version number starts with "1.8" then
-%  \TeXOSInvokerName must be texosquery-jre8
+%  * If the version number starts with "1.8" or above then
+%    \TeXOSInvokerName must be texosquery-jre8
+%    and \TeXOSQueryAllowRestricted should be uncommented if
+%    texosquery-jre8 is on the restricted list. (This has been the
+%    case since TeX Live 2017.)
 
 % (bash users need to check that the .sh extension has been removed
 % from the bash scripts.)
 
-\def\TeXOSInvokerName{texosquery}
+\def\TeXOSInvokerName{texosquery-jre8}
 
 % 2. If the invoker name given in the definition above is on the
-% restricted list, uncomment the line below to allow it to be run
-% in restricted mode:
+% restricted list, the line below should be uncommented to allow it to be run
+% in restricted mode. Otherwise comment it out.
 
-%\TeXOSQueryAllowRestricted
+\TeXOSQueryAllowRestricted
 
-% Leave it commented out if the invoker name is not on the
-% restricted list.
 \endinput
 %%
 %% End of file `texosquery.cfg'.

Modified: trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.sty	2020-02-04 22:20:09 UTC (rev 53675)
+++ trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.sty	2020-02-04 22:21:35 UTC (rev 53676)
@@ -44,7 +44,7 @@
 
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{texosquery}[2017/06/20 v1.6 (NLCT)]
+\ProvidesPackage{texosquery}[2020/02/04 v1.7 (NLCT)]
 \input{texosquery}
 \endinput
 %%

Modified: trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.tex	2020-02-04 22:20:09 UTC (rev 53675)
+++ trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.tex	2020-02-04 22:21:35 UTC (rev 53676)
@@ -55,7 +55,7 @@
   \@texosquery at restore@at
   \expandafter\endinput
 \fi
-\expandafter\def\csname ver at texosquery.tex\endcsname{2017/06/20 v1.6 (NLCT)}
+\expandafter\def\csname ver at texosquery.tex\endcsname{2020/02/04 v1.7 (NLCT)}
 \ifx\@tracklang at pkgwarn\undefined
   \ifx\PackageWarning\undefined
     \def\@texosquery at warn#1{%
@@ -511,7 +511,7 @@
     \catcode`\;=12\relax
     \catcode`\%=12\relax
     \everyeof{\noexpand}\relax
-    \@texosquery at edef\x{\endgroup\def\noexpand#1{\TeXOSQueryInvoker{#2}}}\x
+    \@texosquery at edef\@texosquery at tmp{\endgroup\def\noexpand#1{\TeXOSQueryInvoker{#2}}}\@texosquery at tmp
   \fi
 }
 \def\TeXOSQueryFromFile#1#2{%
@@ -537,7 +537,7 @@
       \catcode`\;=12\relax
       \catcode`\%=12\relax
       \everyeof{\noexpand}\relax
-      \@texosquery at edef\x{\endgroup\def\noexpand#1{\texosquery at input #2 }}\x
+      \@texosquery at edef\@texosquery at tmp{\endgroup\def\noexpand#1{\texosquery at input #2 }}\@texosquery at tmp
    \fi
 }
 \def\texosquerycurrency#1{%
@@ -1024,7 +1024,7 @@
 \def\texosquerydefpattern#1#2{%
  \begingroup
   \@texosquery at pattern@shortcuts
-  \@texosquery at edef\x{\endgroup\def\noexpand#1{#2}}\x
+  \@texosquery at edef\@texosquery at tmp{\endgroup\def\noexpand#1{#2}}\@texosquery at tmp
 }
 \def\texosqueryfmtdatetime#1{%
   \def\@texosquery at fmt@dt at pattern{#1}%



More information about the tex-live-commits mailing list.