OSDN Git Service

Test for directory before trying to cd into it
authorkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 22 Jan 2000 19:05:31 +0000 (19:05 +0000)
committerkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 22 Jan 2000 19:05:31 +0000 (19:05 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31561 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fixinc/fixincl.sh
gcc/fixinc/inclhack.sh
gcc/fixinc/inclhack.tpl

index f355935..a19dd4d 100644 (file)
@@ -1,3 +1,8 @@
+2000-01-21  Jim Wilson  <wilson@cygnus.com>
+
+       * fixinc/inclhack.tpl: Test for directory before trying to cd into it.
+       * fixinc/fixincl.sh, fixinc/inclhack.sh: Regenerate.
+
 2000-01-21  Zack Weinberg  <zack@wolery.cumb.org>
 
        * cpphash.c (change_newlines): Delete function.
index 9a9bf9f..acdf488 100755 (executable)
@@ -138,7 +138,14 @@ for INPUT in ${INPUTLIST} ; do
 
 cd ${ORIGDIR}
 
-cd ${INPUT} || continue
+#  Make sure a directory exists before changing into it,
+#  otherwise Solaris2 will fail-exit the script.
+#
+if [ ! -d ${INPUT} ]; then
+  continue
+fi
+cd ${INPUT}
+
 INPUT=`${PWDCMD}`
 
 #
index 7de99b6..8761c8b 100755 (executable)
@@ -139,7 +139,14 @@ for INPUT in ${INPUTLIST} ; do
 
 cd ${ORIGDIR}
 
-cd ${INPUT} || continue
+#  Make sure a directory exists before changing into it,
+#  otherwise Solaris2 will fail-exit the script.
+#
+if [ ! -d ${INPUT} ]; then
+  continue
+fi
+cd ${INPUT}
+
 INPUT=`${PWDCMD}`
 
 #
index 4300f21..d264d5b 100644 (file)
@@ -135,7 +135,14 @@ for INPUT in ${INPUTLIST} ; do
 
 cd ${ORIGDIR}
 
-cd ${INPUT} || continue
+#  Make sure a directory exists before changing into it,
+#  otherwise Solaris2 will fail-exit the script.
+#
+if [ ! -d ${INPUT} ]; then
+  continue
+fi
+cd ${INPUT}
+
 INPUT=`${PWDCMD}`
 
 #