Commit b3ea4fca by Per Bothner

fixincludes: When running find...

* fixincludes:  When running find, add "/." to directory name
to force expanding symlinks to directories.

From-SVN: r12211
parent 35e93fb4
...@@ -75,14 +75,11 @@ do ...@@ -75,14 +75,11 @@ do
for d in $dirs for d in $dirs
do do
echo " Searching $INPUT/$d" echo " Searching $INPUT/$d"
if [ "$d" != . ]
then
d=$d/.
fi
# Find all directories under $d, relative to $d, excluding $d itself. # Find all directories under $d, relative to $d, excluding $d itself.
files="$files `find $d -type d -print | \ # (The /. is needed after $d in case $d is a symlink.)
sed -e '/\/\.$/d' -e '/^\.$/d'`" files="$files `find $d/. -type d -print | \
sed -e '/\/\.$/d' -e 's@/./@/@g'`"
# Find all links to directories. # Find all links to directories.
# Using `-exec test -d' in find fails on some systems, # Using `-exec test -d' in find fails on some systems,
# and trying to run test via sh fails on others, # and trying to run test via sh fails on others,
...@@ -90,7 +87,7 @@ do ...@@ -90,7 +87,7 @@ do
# First find all the links, then test each one. # First find all the links, then test each one.
theselinks= theselinks=
$LINKS && \ $LINKS && \
theselinks=`find $d -type l -print` theselinks=`find $d/. -type l -print | sed -e 's@/./@/@g'`
for d1 in $theselinks --dummy-- for d1 in $theselinks --dummy--
do do
# If the link points to a directory, # If the link points to a directory,
...@@ -185,7 +182,7 @@ if $LINKS; then ...@@ -185,7 +182,7 @@ if $LINKS; then
# root area. # root area.
for file2 in $files; do for file2 in $files; do
case $file2 in case $file2 in
$file/./*) $file/*)
dupdir=${LIB}/root$x/`echo $file2 | sed -n "s|^${file}/||p"` dupdir=${LIB}/root$x/`echo $file2 | sed -n "s|^${file}/||p"`
echo "Duplicating ${file}'s ${dupdir}" echo "Duplicating ${file}'s ${dupdir}"
if [ -d ${dupdir} ] if [ -d ${dupdir} ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment