[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch 1 of 4: Better DOS path support
From: |
Tim Van Holder |
Subject: |
Patch 1 of 4: Better DOS path support |
Date: |
Sat, 10 Feb 2001 22:52:52 +0100 |
2001-02-10 Tim Van Holder <address@hidden>
* ylwrap: Support DOS-style absolute paths. Don't use
'ln -s' on DOSish systems.
* tests/defs: Support DOS-style absolute paths.
* tests/installsh.test: Support DOS-style absolute paths.
Index: ylwrap
===================================================================
RCS file: /cvs/automake/ylwrap,v
retrieving revision 1.13
diff -u -r1.13 ylwrap
--- ylwrap 2000/10/16 09:01:36 1.13
+++ ylwrap 2001/02/10 21:25:16
@@ -31,15 +31,15 @@
shift
# Make any relative path in $prog absolute.
case "$prog" in
- /* | [A-Za-z]:*) ;;
- */*) prog="`pwd`/$prog" ;;
+ [/\\]* | [A-Za-z]:[/\\]*) ;;
+ *[\\/]*) prog="`pwd`/$prog" ;;
esac
# The input.
input="$1"
shift
case "$input" in
- /* | [A-Za-z]:*)
+ [/\\]* | [A-Za-z]:[/\\]*)
# Absolute path; do nothing.
;;
*)
@@ -75,12 +75,17 @@
cd $dirname
case "$input" in
- /* | [A-Za-z]:*)
+ [/\\]* | [A-Za-z]:[/\\]*)
# Absolute path; do nothing.
;;
*)
# Make a symbolic link, hard link or hardcopy.
- ln -s ../"$input" . > /dev/null 2>&1 || ln ../"$input" . > /dev/null
2>&1 || cp ../"$input" .
+ if test -n "$COMSPEC$ComSpec"; then
+ # DOSish system: don't try ln -s; it is most likely broken.
+ ln ../"$input" . > /dev/null 2>&1 || cp ../"$input" .
+ else
+ ln -s ../"$input" . > /dev/null 2>&1 || ln ../"$input" . > /dev/null
2>&1 || cp ../"$input" .
+ fi
;;
esac
$prog ${1+"$@"} "$input"
@@ -114,7 +119,7 @@
# If $2 is an absolute path name, then just use that,
# otherwise prepend `../'.
case "$2" in
- /* | [A-Za-z]:*) target="$2";;
+ [/\\]* | [A-Za-z]:[/\\]*) target="$2";;
*) target="../$2";;
esac
mv "$from" "$target" || status=$?
Index: tests/defs
===================================================================
RCS file: /cvs/automake/tests/defs,v
retrieving revision 1.21
diff -u -r1.21 defs
--- tests/defs 2001/01/26 14:21:37 1.21
+++ tests/defs 2001/02/10 21:25:16
@@ -11,7 +11,7 @@
# Always use an absolute srcdir. Otherwise symlinks made in subdirs
# of the test dir just won't work.
case "$srcdir" in
- /*)
+ [\\/]* | ?:[\\/]*)
;;
*)
Index: tests/installsh.test
===================================================================
RCS file: /cvs/automake/tests/installsh.test,v
retrieving revision 1.2
diff -u -r1.2 installsh.test
--- tests/installsh.test 1999/02/01 11:49:56 1.2
+++ tests/installsh.test 2001/02/10 21:25:16
@@ -17,7 +17,7 @@
# If srcdir is relative, we need to modify it.
case "$srcdir" in
- /*)
+ [\\/]* | ?:[\\/]*)
;;
*)
- Patch 1 of 4: Better DOS path support,
Tim Van Holder <=
- Re: Patch 1 of 4: Better DOS path support, Akim Demaille, 2001/02/19
- RE: Patch 1 of 4: Better DOS path support, Tim Van Holder, 2001/02/19
- Re: Patch 1 of 4: Better DOS path support, Akim Demaille, 2001/02/20
- Manual additions (DOS issues), Tim Van Holder, 2001/02/20
- Re: Manual additions (DOS issues), Akim Demaille, 2001/02/21
- RE: Manual additions (DOS issues), Tim Van Holder, 2001/02/21
- RE: Manual additions (DOS issues), Tim Van Holder, 2001/02/21
- Re: Manual additions (DOS issues), Akim Demaille, 2001/02/22
- Re: Manual additions (DOS issues), Alexandre Oliva, 2001/02/22
- RE: Manual additions (DOS issues), Tim Van Holder, 2001/02/22