+2001-07-01 Tim Van Holder <tim.van.holder@pandora.be>
+
+ * lib/ylwrap: Improve support for DOS paths (and paths
+ containing backslashes in general).
+
2001-07-01 Tom Tromey <tromey@redhat.com>
* lib/missing: Added special exception to license.
input="$1"
shift
case "$input" in
- /* | [A-Za-z]:*)
+ [\\/]* | ?:[\\/]*)
# Absolute path; do nothing.
;;
*)
esac
# The directory holding the input.
-input_dir="`echo $input | sed -e 's,/[^/]*$,,'`"
+input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'`
# Quote $INPUT_DIR so we can use it in a regexp.
-# FIXME: really we should care about more than `.'.
-input_rx="`echo $input_dir | sed -e 's,\.,\\\.,g'`"
+# FIXME: really we should care about more than `.' and `\'.
+input_rx=`echo "$input_dir" | sed -e 's,\\\\,\\\\\\\\,g' -e 's,\\.,\\\\.,g'`
echo "got $input_rx"
shift
# Make any relative path in $prog absolute.
case "$prog" in
- /* | [A-Za-z]:*) ;;
- */*) prog="`pwd`/$prog" ;;
+ [\\/]* | ?:[\\/]*) ;;
+ *[\\/]*) prog="`pwd`/$prog" ;;
esac
# FIXME: add hostname here for parallel makes that run commands on
# If $2 is an absolute path name, then just use that,
# otherwise prepend `../'.
case "$2" in
- /* | [A-Za-z]:*) target="$2";;
+ [\\/]* | ?:[\\/]*) target="$2";;
*) target="../$2";;
esac