]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/fixinc/inclhack.tpl
Test for directory before trying to cd into it
[thirdparty/gcc.git] / gcc / fixinc / inclhack.tpl
index 4300f216935959954aad67ba5ce8b401f0a50551..d264d5b0c476d3b9596e2f480b557ce915bfc84a 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}`
 
 #