texlive[44509] trunk: texosquery (23may17)

commits+karl at tug.org commits+karl at tug.org
Tue Jun 6 23:55:13 CEST 2017


Revision: 44509
          http://tug.org/svn/texlive?view=revision&revision=44509
Author:   karl
Date:     2017-06-06 23:55:13 +0200 (Tue, 06 Jun 2017)
Log Message:
-----------
texosquery (23may17)

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/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	2017-06-06 21:54:50 UTC (rev 44508)
+++ trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery-jre5.sh	2017-06-06 21:55:13 UTC (rev 44509)
@@ -1,5 +1,11 @@
 #!/bin/sh
 
 
-jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar`
+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`
+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	2017-06-06 21:54:50 UTC (rev 44508)
+++ trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery-jre8.sh	2017-06-06 21:55:13 UTC (rev 44509)
@@ -1,5 +1,11 @@
 #!/bin/sh
 
 
-jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar`
+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`
+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	2017-06-06 21:54:50 UTC (rev 44508)
+++ trunk/Build/source/texk/texlive/linked_scripts/texosquery/texosquery.sh	2017-06-06 21:55:13 UTC (rev 44509)
@@ -1,5 +1,11 @@
 #!/bin/sh
 
 
-jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar`
+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`
+fi
 java -jar "$jarpath" "$@"

Modified: trunk/Master/texmf-dist/doc/support/texosquery/CHANGES
===================================================================
--- trunk/Master/texmf-dist/doc/support/texosquery/CHANGES	2017-06-06 21:54:50 UTC (rev 44508)
+++ trunk/Master/texmf-dist/doc/support/texosquery/CHANGES	2017-06-06 21:55:13 UTC (rev 44509)
@@ -1,3 +1,17 @@
+1.5 (2017/05/23):
+
+ * Added new command line options:
+    --strip-path-prefix (-sp)
+    --nostrip-path-prefix
+    --strip-uri-prefix (-su)
+    --nostrip-uri-prefix
+    --replace-path (-rp)
+    --noreplace-path
+    --replace-uri (-ru)
+    --noreplace-uri
+
+ * Bash scripts now check for cygwin
+
 1.4 (2017/05/05):
 
  * The fallback value for 'openin_any' for texosquery-jre8

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	2017-06-06 21:54:50 UTC (rev 44508)
+++ trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre5.sh	2017-06-06 21:55:13 UTC (rev 44509)
@@ -1,5 +1,11 @@
 #!/bin/sh
 
 
-jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar`
+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`
+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	2017-06-06 21:54:50 UTC (rev 44508)
+++ trunk/Master/texmf-dist/scripts/texosquery/texosquery-jre8.sh	2017-06-06 21:55:13 UTC (rev 44509)
@@ -1,5 +1,11 @@
 #!/bin/sh
 
 
-jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar`
+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`
+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	2017-06-06 21:54:50 UTC (rev 44508)
+++ trunk/Master/texmf-dist/scripts/texosquery/texosquery.sh	2017-06-06 21:55:13 UTC (rev 44509)
@@ -1,5 +1,11 @@
 #!/bin/sh
 
 
-jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar`
+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`
+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	2017-06-06 21:54:50 UTC (rev 44508)
+++ trunk/Master/texmf-dist/source/support/texosquery/java/TeXOSQuery.java	2017-06-06 21:55:13 UTC (rev 44509)
@@ -790,6 +790,17 @@
          filename = filename.replaceAll("\\\\", "/");
       }
 
+      // Does a prefix need stripping?
+
+      if (stripFilePrefix != null && filename.startsWith(stripFilePrefix))
+      {
+         filename = filename.substring(stripFilePrefix.length());
+      }
+      else if (pathRegExp != null && pathReplacement != null)
+      {
+         filename = filename.replaceFirst(pathRegExp, pathReplacement);
+      }
+
       return escapeFileName(filename);
    }
 
@@ -1553,7 +1564,18 @@
         
       try
       {
-         return escapeFileName(file.getCanonicalFile().toURI().toString());
+         String uri = file.getCanonicalFile().toURI().toString();
+
+         if (stripURIPrefix != null && uri.startsWith("file:/"+stripURIPrefix))
+         {
+            uri = "file:/"+uri.substring(6+stripURIPrefix.length());
+         }
+         else if (uriRegExp != null && uriReplacement != null)
+         {
+            uri = uri.replaceFirst(uriRegExp, uriReplacement);
+         }
+
+         return escapeFileName(uri);
       }
       catch (Exception exception)
       {
@@ -3714,6 +3736,47 @@
       }
 
       System.out.println();
+
+      System.out.println("--strip-path-prefix <prefix> or -sp <prefix>");
+      System.out.println("\tStrip the given prefix from returned path names.");
+      System.out.println("\tCan't be used with --replace-path.");
+      System.out.println();
+
+      System.out.println("--nostrip-path-prefix");
+      System.out.println("\tCancel the effect of --strip-path-prefix.");
+      System.out.println();
+
+      System.out.println("--replace-path <regex> <replacement> or -rp <regex> <replacement>");
+      System.out.println("\tSubstitutes the first occurrence of <regex> with");
+      System.out.println("\t<replacement> in any returned path names.");
+      System.out.println("\tCan't be used with --strip-path-prefix.");
+      System.out.println();
+
+      System.out.println("--noreplace-path");
+      System.out.println("\tCancel the effect of --replace-path.");
+      System.out.println();
+
+      System.out.println("--strip-uri-prefix <prefix> or -su <prefix>");
+      System.out.println("\tReplace 'file:/<prefix>' with 'file:/'");
+      System.out.println("\tfrom returned URIs.");
+      System.out.println("\tCan't be used with --replace-uri.");
+      System.out.println();
+
+      System.out.println("--nostrip-uri-prefix");
+      System.out.println("\tCancel the effect of --strip-uri-prefix.");
+      System.out.println();
+
+      System.out.println("--replace-uri <regex> <replacement> or -ru <regex> <replacement>");
+      System.out.println("\tSubstitutes the first occurrence of <regex> with");
+      System.out.println("\t<replacement> in any returned URIs.");
+      System.out.println("\tCan't be used with --strip-uri-prefix.");
+      System.out.println();
+
+      System.out.println("--noreplace-uri");
+      System.out.println("\tCancel the effect of --replace-uri.");
+      System.out.println();
+
+      System.out.println();
       System.out.println("General actions:");
       System.out.println();
 
@@ -3959,7 +4022,7 @@
                }
             }
          }
-         else if (args[i].equals("--compatible") || args[i].equals("-compat"))
+         else if (isArg(args[i], "compat", "compatible"))
          {
             if (actions.size() > 0)
             {
@@ -3993,6 +4056,166 @@
                }
             }
          }
+         else if (isArg(args[i], "sp", "strip-path-prefix"))
+         {
+            if (actions.size() > 0)
+            {
+               throw new IllegalArgumentException(String.format(
+                "Options must come before actions. Found option: %s", args[i]));
+            }
+
+            if (pathRegExp != null)
+            {
+               throw new IllegalArgumentException(String.format(
+                 "Option clash: %s and --replace-path", args[i]));
+            }
+
+            i = parseArgVal(args, i, argVal);
+
+            if (argVal[1] == null)
+            {
+               throw new IllegalArgumentException(String.format(
+                 "<prefix> expected after: %s", args[i]));
+            }
+
+            stripFilePrefix = (String)argVal[1];
+         }
+         else if (isArg(args[i], "nostrip-path-prefix"))
+         {
+            if (actions.size() > 0)
+            {
+               throw new IllegalArgumentException(String.format(
+                "Options must come before actions. Found option: %s", args[i]));
+            }
+
+            stripFilePrefix = null;
+         }
+         else if (isArg(args[i], "rp", "replace-path"))
+         {
+            if (actions.size() > 0)
+            {
+               throw new IllegalArgumentException(String.format(
+                "Options must come before actions. Found option: %s", args[i]));
+            }
+
+            if (stripFilePrefix != null)
+            {
+               throw new IllegalArgumentException(String.format(
+                 "Option clash: --strip-path-prefix and %s", args[i]));
+            }
+
+            i = parseArgVal(args, i, argVal);
+
+            pathRegExp = (String)argVal[1];
+
+            if (pathRegExp == null)
+            {
+               throw new IllegalArgumentException(String.format(
+                 "<regex> <replacement> expected after: %s", args[i]));
+            }
+
+            i = parseArgVal(args, i, argVal);
+
+            pathReplacement = (String)argVal[1];
+
+            if (pathReplacement == null)
+            {
+               throw new IllegalArgumentException(String.format(
+                 "<replacement> expected after: %s %s", args[i], pathRegExp));
+            }
+
+         }
+         else if (isArg(args[i], "noreplace-path"))
+         {
+            if (actions.size() > 0)
+            {
+               throw new IllegalArgumentException(String.format(
+                "Options must come before actions. Found option: %s", args[i]));
+            }
+
+            pathRegExp = null;
+            pathReplacement = null;
+         }
+         else if (isArg(args[i], "su", "strip-uri-prefix"))
+         {
+            if (actions.size() > 0)
+            {
+               throw new IllegalArgumentException(String.format(
+                "Options must come before actions. Found option: %s", args[i]));
+            }
+
+            if (uriRegExp != null)
+            {
+               throw new IllegalArgumentException(String.format(
+                 "Option clash: %s and --replace-uri", args[i]));
+            }
+
+            i = parseArgVal(args, i, argVal);
+
+            if (argVal[1] == null)
+            {
+               throw new IllegalArgumentException(String.format(
+                 "<prefix> expected after: %s", args[i]));
+            }
+
+            stripURIPrefix = (String)argVal[1];
+         }
+         else if (isArg(args[i], "nostrip-uri-prefix"))
+         {
+            if (actions.size() > 0)
+            {
+               throw new IllegalArgumentException(String.format(
+                "Options must come before actions. Found option: %s", args[i]));
+            }
+
+            stripURIPrefix = null;
+         }
+         else if (isArg(args[i], "ru", "replace-uri"))
+         {
+            if (actions.size() > 0)
+            {
+               throw new IllegalArgumentException(String.format(
+                "Options must come before actions. Found option: %s", args[i]));
+            }
+
+            if (stripURIPrefix != null)
+            {
+               throw new IllegalArgumentException(String.format(
+                 "Option clash: --strip-uri-prefix and %s", args[i]));
+            }
+
+            i = parseArgVal(args, i, argVal);
+
+            uriRegExp = (String)argVal[1];
+
+            if (uriRegExp == null)
+            {
+               throw new IllegalArgumentException(String.format(
+                 "<regex> <replacement> expected after: %s", args[i]));
+            }
+
+            i = parseArgVal(args, i, argVal);
+
+            uriReplacement = (String)argVal[1];
+
+            if (uriReplacement == null)
+            {
+               throw new IllegalArgumentException(String.format(
+                 "<replacement> expected after: %s %s", args[i], uriRegExp));
+            }
+
+         }
+         else if (isArg(args[i], "noreplace-uri"))
+         {
+            if (actions.size() > 0)
+            {
+               throw new IllegalArgumentException(String.format(
+                "Options must come before actions. Found option: %s", args[i]));
+            }
+
+            uriRegExp = null;
+            uriReplacement = null;
+         }
          else
          {
              throw new IllegalArgumentException(String.format(
@@ -4312,8 +4535,8 @@
     
    public static final int DEFAULT_COMPATIBLE=2;
 
-   private static final String VERSION_NUMBER = "1.4";
-   private static final String VERSION_DATE = "2017-05-05";
+   private static final String VERSION_NUMBER = "1.5";
+   private static final String VERSION_DATE = "2017-05-23";
    private static final char BACKSLASH = '\\';
    private static final long ZERO = 0L;
 
@@ -4336,6 +4559,31 @@
    private File texmfoutput = null;
 
    /**
+    * If not null, strip from the start of returned path names.
+    * @since 1.5
+    */ 
+   private String stripFilePrefix = null;
+
+   /**
+    *Instead of using the above, provide a regular expression and replacement. 
+    * @since 1.5
+    */ 
+   private String pathRegExp=null, pathReplacement=null;
+
+   /**
+    * If not null, strip from the start of returned URI path names
+    * (after file:/).
+    * @since 1.5
+    */ 
+   private String stripURIPrefix = null;
+
+   /**
+    *Instead of using the above, provide a regular expression and replacement. 
+    * @since 1.5
+    */ 
+   private String uriRegExp=null, uriReplacement=null;
+
+   /**
     * Debug level. (0 = no debugging, 1 or more print error messages to
     * STDERR, 2 or more include stack trace, 3 or more include
     * informational messages.)

Modified: trunk/Master/texmf-dist/source/support/texosquery/texosquery.dtx
===================================================================
--- trunk/Master/texmf-dist/source/support/texosquery/texosquery.dtx	2017-06-06 21:54:50 UTC (rev 44508)
+++ trunk/Master/texmf-dist/source/support/texosquery/texosquery.dtx	2017-06-06 21:55:13 UTC (rev 44509)
@@ -81,6 +81,8 @@
 \newcommand*{\longarg}[1]{\longargfmt{#1}%
  \index{texosquery options=\app{texosquery} options>#1=\protect\longargfmt{#1}|hyperpage}}
 
+\newcommand*{\Index}[1]{#1\index{#1|hyperpage}}
+
 \newenvironment{important}
  {\begin{quote}\textbf{Important Note:}}
  {\end{quote}}
@@ -125,7 +127,7 @@
 %\author{Nicola L. C. Talbot\\
 %\href{http://www.dickimaw-books.com/}{\nolinkurl{dickimaw-books.com}}
 %\and Paulo Cereda}
-%\date{2017-05-05 (v1.4)}
+%\date{2017-05-23 (v1.5)}
 %\maketitle
 %
 %\begin{abstract}
@@ -646,6 +648,21 @@
 %For the full list of shortcut commands, see the
 %definition of \hyperlink{enableshortcs}{\cs{@texosquery at enableshortcs}}.
 %
+%If the operating system uses a backslash \verb|\| as a directory
+%divider, returned path names will always replace this with a
+%forward slash \verb|/| (which is then converted to \cs{fslh}, as
+%described above). This is designed to make the result as compatible
+%as possible with \TeX\ file commands (such as \cs{input}) which
+%require a forward slash. However, for some systems,
+%further modification may need to be done. For example, with \TeX\
+%on \Index{Cygwin}, the Windows path name
+%\verb|c:\cygwin64\usr\local\texlive| may correspond to the \TeX\ path
+%name \file{/usr/local/texlive}. This path is returned by
+%\app{texosquery} as \file{c:/cygwin64/usr/local/texlive} (\cs{fcln} and 
+%\cs{fslh} replaced for clarity). You can use
+%\longargfmt{strip-path-prefix} to strip the leading
+%\file{c:/cygwin64} for convenience (see section~\ref{sec:invocation}).
+%
 %The output produced by the \app{texosquery} application 
 %will be returned using the system's default input
 %encoding.  (For example, \gls{UTF}-8.) You will need to ensure that your \TeX\
@@ -739,7 +756,7 @@
 %provided by Java. For example, Java currently doesn't
 %provide any methods to access telephone codes.
 %
-%\subsection{Command line invocation}
+%\subsection{Command line invocation}\label{sec:invocation}
 %The syntax for the command line invocation of \app{texosquery}
 %is:
 %\begin{definition}
@@ -760,10 +777,13 @@
 %\begin{description}
 %\item[\shortarg{h} or \longarg{help} or \shortarg{help}] Displays help message and
 %exits.
+%
 %\item[\shortarg{v} or \longarg{version} or \shortarg{version}] Displays version
 %information and exits.
+%
 %\item[\longarg{nodebug}] No debugging information. Only command
 %line syntax errors are written to STDERR. (Default.)
+%
 %\item[\longarg{debug} \oarg{n} or \shortarg{debug} \oarg{n}] Set the debugging level, where
 %\meta{n} is a non-negative integer.
 %If \meta{n} is omitted, 3 is assumed. If \meta{n} is 0, then
@@ -772,10 +792,11 @@
 %written to STDERR. If \meta{n} $\geq 2$, any exceptions encountered
 %will additionally write the stack trace to STDERR. If \meta{n}
 %$\geq 3$ non-error informational messages are included.
+%
 %\item[\longarg{compatible} \meta{n} or \shortarg{compat} \meta{n}]
 %Set the compatibility mode.
 %The argument should be either a non-negative integer (0 for version
-%1.0, 1 for version 1.1, etc) or the keyword \texttt{latest} to
+%1.0, 1 for version 1.1, 2 for version 1.2 onwards) or the keyword \texttt{latest} to
 %indicate the latest version (default). Note that the compatibility
 %mode only affects the available actions and the display style of the
 %result, and does not change security features. For example, the check for the 
@@ -783,6 +804,65 @@
 %is still checked even if the compatibility mode is set to 0 or 1.
 %\end{description}
 %
+%The following options (introduced in v1.5) allow returned paths or URIs 
+%to be altered (for example, if a mount point needs to be removed).
+%Note that these options only affect \emph{returned} paths, not
+%path names provided in the command line. The substitution is
+%performed after any backslash directory dividers
+%\verb|\| are changed to forward slashes \texttt{/} (if applicable) but before 
+%non-alphanumerics are changed to control sequences (such as 
+%\cs{fcln} or \cs{fslh}). If there's no match, the path is returned
+%without alteration.
+%
+%\begin{description}
+%\item[\longarg{strip-path-prefix} \meta{prefix} or \shortarg{sp}
+%\meta{prefix}]
+%Strip \meta{prefix} from the start of returned path names (but
+%not URIs, see below). For example:
+%\begin{verbatim}
+%texosquery --strip-path-prefix c:/cygwin64 -p article.cls
+%\end{verbatim}
+%This will strip the \texttt{c:/cygwin64} mount point. Note that 
+%\meta{prefix} isn't an expression. For a regular expression, use
+%\longarg{replace-path}. (This option can't be
+%used with \longarg{replace-path}.)
+%
+%\item[\longarg{nostrip-path-prefix}]
+%Cancels the effect of \longarg{strip-path-prefix}.
+%
+%\item[\longarg{replace-path} \meta{regex} \meta{replacement}
+%or \shortarg{rp} \meta{regex} \meta{replacement}]
+%This replaces the \emph{first} occurrence of the regular
+%expression \meta{regex} in any returned path (but not URI) and replaces it with
+%\meta{replacement}.
+%
+%\item[\longarg{noreplace-path}]
+%Cancels the effect of the \longarg{replace-path}.
+%
+%\item[\longarg{strip-uri-prefix} \meta{prefix} or \shortarg{su}
+%\meta{prefix}]
+%Replace initial \texttt{file:/}\meta{prefix} with just
+%\texttt{file:/} from returned URIs. Note that 
+%\meta{prefix} isn't an expression. For a regular expression, use
+%\longarg{replace-uri}. (This option can't be
+%used with \longarg{replace-uri}.)
+%
+%\item[\longarg{nostrip-uri-prefix}]
+%Cancels the effect of \longarg{strip-uri-prefix}.
+%
+%\item[\longarg{replace-uri} \meta{regex} \meta{replacement}
+%or \shortarg{ru} \meta{regex} \meta{replacement}]
+%This replaces the \emph{first} occurrence of the regular
+%expression \meta{regex} in any returned URI and replaces it with
+%\meta{replacement}. For example:
+%\begin{verbatim}
+%texosquery -ru file:/C: file://cgwin64/c -u filename
+%\end{verbatim}
+%
+%\item[\longarg{noreplace-uri}]
+%Cancels the effect of the \longarg{replace-uri}.
+%\end{description}
+%
 %If multiple actions are given, they will be processed in the
 %order specified in the command line invocation. Each result will
 %be displayed on a separate line. As from v1.1, if there are
@@ -2547,7 +2627,7 @@
 %    \end{macrocode}
 % Version info.
 %    \begin{macrocode}
-\expandafter\def\csname ver at texosquery.tex\endcsname{2017/05/05 v1.4 (NLCT)}
+\expandafter\def\csname ver at texosquery.tex\endcsname{2017/05/23 v1.5 (NLCT)}
 %    \end{macrocode}
 %
 %\begin{macro}{\@texosquery at warn}
@@ -7825,7 +7905,7 @@
 %Identify package:
 %    \begin{macrocode}
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{texosquery}[2017/05/05 v1.4 (NLCT)]
+\ProvidesPackage{texosquery}[2017/05/23 v1.5 (NLCT)]
 %    \end{macrocode}
 %Load \file{texosquery.tex}:
 %    \begin{macrocode}
@@ -7846,37 +7926,38 @@
 %    \end{macrocode}
 %\fi
 %    \begin{macrocode}
- % This configuration file must be edited to match your system.
- % Copy the file to your TEXMFLOCAL or TEXMFHOME tree to prevent it
- % from being overwritten by updates.
+%<<COMMENT
+% This configuration file must be edited to match your system.
+% Copy the file to your TEXMFLOCAL or TEXMFHOME tree to prevent it
+% from being overwritten by updates.
 
- % 1. Check your version of Java. To do this run
- %      java -version
- % from your command line.
+% 1. Check your version of Java. To do this run
+%      java -version
+% from your command line.
 
- %  * If the version number starts with "1.5" or "1.6" then
- %  \TeXOSInvokerName must be texosquery-jre5
- %
- %  * If the version number starts with "1.7" then
- %  \TeXOSInvokerName must be texosquery
- %
- %  * If the version number starts with "1.8" then
- %  \TeXOSInvokerName must be texosquery-jre8
+%  * If the version number starts with "1.5" or "1.6" then
+%  \TeXOSInvokerName must be texosquery-jre5
+%
+%  * If the version number starts with "1.7" then
+%  \TeXOSInvokerName must be texosquery
+%
+%  * If the version number starts with "1.8" then
+%  \TeXOSInvokerName must be texosquery-jre8
 
- % (bash users need to check that the .sh extension has been removed
- % from the bash scripts.)
+% (bash users need to check that the .sh extension has been removed
+% from the bash scripts.)
 
- \def\TeXOSInvokerName{texosquery}
+\def\TeXOSInvokerName{texosquery}
 
- % 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:
+% 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:
 
- %\TeXOSQueryAllowRestricted
+%\TeXOSQueryAllowRestricted
 
- % Leave it commented out if the invoker name is not on the
- % restricted list.
-
+% Leave it commented out if the invoker name is not on the
+% restricted list.
+%COMMENT
 %    \end{macrocode}
 %\iffalse
 %    \begin{macrocode}
@@ -7898,9 +7979,16 @@
 %    \end{macrocode}
 %\fi
 %\subsubsection{\file{texosquery.sh}}
+%This now has a check for cygwin.
 %    \begin{macrocode}
-jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery.jar`
-java -jar "$jarpath" "$@"
+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`
+fi
+java -jar "$jarpath" "$@" 
 %    \end{macrocode}
 %\iffalse
 %    \begin{macrocode}
@@ -7915,7 +8003,13 @@
 %\fi
 %\subsubsection{\file{texosquery-jre8.sh}}
 %    \begin{macrocode}
-jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre8.jar`
+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`
+fi
 java -Djava.locale.providers=CLDR,JRE -jar "$jarpath" "$@"
 %    \end{macrocode}
 %\iffalse
@@ -7931,7 +8025,13 @@
 %\fi
 %\subsubsection{\file{texosquery-jre5.sh}}
 %    \begin{macrocode}
-jarpath=`kpsewhich --progname=texosquery --format=texmfscripts texosquery-jre5.jar`
+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`
+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	2017-06-06 21:54:50 UTC (rev 44508)
+++ trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.cfg	2017-06-06 21:55:13 UTC (rev 44509)
@@ -9,37 +9,36 @@
 %% Please follow the instructions below.
 
 
- % This configuration file must be edited to match your system.
- % Copy the file to your TEXMFLOCAL or TEXMFHOME tree to prevent it
- % from being overwritten by updates.
+% This configuration file must be edited to match your system.
+% Copy the file to your TEXMFLOCAL or TEXMFHOME tree to prevent it
+% from being overwritten by updates.
 
- % 1. Check your version of Java. To do this run
- %      java -version
- % from your command line.
+% 1. Check your version of Java. To do this run
+%      java -version
+% from your command line.
 
- %  * If the version number starts with "1.5" or "1.6" then
- %  \TeXOSInvokerName must be texosquery-jre5
- %
- %  * If the version number starts with "1.7" then
- %  \TeXOSInvokerName must be texosquery
- %
- %  * If the version number starts with "1.8" then
- %  \TeXOSInvokerName must be texosquery-jre8
+%  * If the version number starts with "1.5" or "1.6" then
+%  \TeXOSInvokerName must be texosquery-jre5
+%
+%  * If the version number starts with "1.7" then
+%  \TeXOSInvokerName must be texosquery
+%
+%  * If the version number starts with "1.8" then
+%  \TeXOSInvokerName must be texosquery-jre8
 
- % (bash users need to check that the .sh extension has been removed
- % from the bash scripts.)
+% (bash users need to check that the .sh extension has been removed
+% from the bash scripts.)
 
- \def\TeXOSInvokerName{texosquery}
+\def\TeXOSInvokerName{texosquery}
 
- % 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:
+% 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:
 
- %\TeXOSQueryAllowRestricted
+%\TeXOSQueryAllowRestricted
 
- % Leave it commented out if the invoker name is not on the
- % restricted list.
-
+% 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	2017-06-06 21:54:50 UTC (rev 44508)
+++ trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.sty	2017-06-06 21:55:13 UTC (rev 44509)
@@ -44,7 +44,7 @@
 
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{texosquery}[2017/05/05 v1.4 (NLCT)]
+\ProvidesPackage{texosquery}[2017/05/23 v1.5 (NLCT)]
 \input{texosquery}
 \endinput
 %%

Modified: trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.tex
===================================================================
--- trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.tex	2017-06-06 21:54:50 UTC (rev 44508)
+++ trunk/Master/texmf-dist/tex/latex/texosquery/texosquery.tex	2017-06-06 21:55:13 UTC (rev 44509)
@@ -55,7 +55,7 @@
   \@texosquery at restore@at
   \expandafter\endinput
 \fi
-\expandafter\def\csname ver at texosquery.tex\endcsname{2017/05/05 v1.4 (NLCT)}
+\expandafter\def\csname ver at texosquery.tex\endcsname{2017/05/23 v1.5 (NLCT)}
 \ifx\@tracklang at pkgwarn\undefined
   \ifx\PackageWarning\undefined
     \def\@texosquery at warn#1{%



More information about the tex-live-commits mailing list