aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@cygnus.com>2000-01-22 19:05:31 +0000
committerBruce Korb <korbb@gcc.gnu.org>2000-01-22 19:05:31 +0000
commit5787d8dadf6e244afc1d3e734f08f73af068dcfb (patch)
treede924ff045e731ea30b397fafce6a9afdc5e716a
parent821ee7fb3542e51cee589fee5339ad1f576648f0 (diff)
downloadgcc-5787d8dadf6e244afc1d3e734f08f73af068dcfb.zip
gcc-5787d8dadf6e244afc1d3e734f08f73af068dcfb.tar.gz
gcc-5787d8dadf6e244afc1d3e734f08f73af068dcfb.tar.bz2
Test for directory before trying to cd into it
From-SVN: r31561
-rw-r--r--gcc/ChangeLog5
-rwxr-xr-xgcc/fixinc/fixincl.sh9
-rwxr-xr-xgcc/fixinc/inclhack.sh9
-rw-r--r--gcc/fixinc/inclhack.tpl9
4 files changed, 29 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f355935..a19dd4d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/fixinc/fixincl.sh b/gcc/fixinc/fixincl.sh
index 9a9bf9f..acdf488 100755
--- a/gcc/fixinc/fixincl.sh
+++ b/gcc/fixinc/fixincl.sh
@@ -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}`
#
diff --git a/gcc/fixinc/inclhack.sh b/gcc/fixinc/inclhack.sh
index 7de99b6..8761c8b 100755
--- a/gcc/fixinc/inclhack.sh
+++ b/gcc/fixinc/inclhack.sh
@@ -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}`
#
diff --git a/gcc/fixinc/inclhack.tpl b/gcc/fixinc/inclhack.tpl
index 4300f21..d264d5b 100644
--- a/gcc/fixinc/inclhack.tpl
+++ b/gcc/fixinc/inclhack.tpl
@@ -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}`
#