From 0cd33d166e95c7b76a7de6c2bdd052681004bb8a Mon Sep 17 00:00:00 2001 From: Marc-André Lureau Date: Feb 08 2022 19:12:44 +0000 Subject: xmlto: convert output path to unix path on cygwin/msys 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 --- diff --git a/xmlto.in b/xmlto.in index fbf2254..e721d43 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 ;;