Don't "make LIB absolute" if already absolute,
authorRichard Stallman <rms@gnu.org>
Thu, 7 Jan 1993 00:31:40 +0000 (00:31 +0000)
committerRichard Stallman <rms@gnu.org>
Thu, 7 Jan 1993 00:31:40 +0000 (00:31 +0000)
to avoid problems with the automounter.

From-SVN: r3137

gcc/fixinc.sco
gcc/fixinc.svr4

index c28039d7065418cee7408bbe03776bb64f5e8bd1..ad849892cca7d4ade5970665cef2cdb119d3d576 100755 (executable)
@@ -58,8 +58,15 @@ fi
 
 ORIG_DIR=`pwd`
 
-# Make LIB absolute.
-cd $LIB; LIB=`pwd`
+# Make LIB absolute if it is relative.
+# Don't do this if not necessary, since may screw up automounters.
+case $LIB in
+/*)
+       ;;
+*)
+       cd $LIB; LIB=`${PWDCMD}`
+       ;;
+esac
 
 echo 'Building fixincludes in ' ${LIB}
 
index d597bc62bcce66ee462f9344a6bc0cb942ddc48a..b2572cb94bd5b413c7ea2e3008212136f743ec7b 100755 (executable)
@@ -53,8 +53,15 @@ fi
 
 ORIG_DIR=`pwd`
 
-# Make LIB absolute.
-cd $LIB; LIB=`pwd`
+# Make LIB absolute if it is relative.
+# Don't do this if not necessary, since may screw up automounters.
+case $LIB in
+/*)
+       ;;
+*)
+       cd $LIB; LIB=`${PWDCMD}`
+       ;;
+esac
 
 # This prevents /bin/ex from failing if the current terminal type is
 # unrecognizable.