From 0cd33d166e95c7b76a7de6c2bdd052681004bb8a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 8 Feb 2022 22:55:57 +0400 Subject: [PATCH] xmlto: convert output path to unix path on cygwin/msys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When xmlto is invoked with "-o C:/src/build", the resulting files end up under a subdirecty "C:/src/build/" of the current working directory. Convert the argument to a unix path on cygwin/msys. Signed-off-by: Marc-André Lureau --- xmlto.in | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/xmlto.in b/xmlto.in index fbf2254919d6..e721d4356658 100755 --- a/xmlto.in +++ b/xmlto.in @@ -314,9 +314,13 @@ while [ "$#" -gt "0" ]; do shift 2 ;; -o) - case "$2" in - /*) OUTPUT_DIR="$2" ;; - *) OUTPUT_DIR="$WD/$2" ;; + OUTPUT_DIR="$2" + if type -p cygpath >/dev/null; then + OUTPUT_DIR=$(cygpath "$OUTPUT_DIR") + fi + case "$OUTPUT_DIR" in + /*) OUTPUT_DIR="$OUTPUT_DIR" ;; + *) OUTPUT_DIR="$WD/$OUTPUT_DIR" ;; esac shift 2 ;; -- 2.34.1.428.gdcc0cd074f0c