cd $top_dir
pwd
files=`find . -type f`
-for file in $files; do
+for file in $files; do
if test ".`file $file | grep Mach-O`" != "." ; then
echo "Changing prefixes of '$file'"
islib=n
- if test ".`file $file | grep 'Mach-O dynamically'`" != "." ; then
+ if test ".`file $file | grep 'dynamically linked shared library'`" != "." ; then
islib=y
fi
libs=`otool -L $file 2>/dev/null | grep $prefix | cut -d\ -f 1`
fi
fi
done
- elif test ".`file $file | grep \"text\|shell\"`" != "." ; then
- echo "Fixing up shell/text file "$file""
+ elif test ".`file $file | grep \"text\|shell\"`" != "." -o ".`echo $file | grep pc$`" != "."; then
+ echo "Fixing up shell/text/pc file "$file""
cp $file $file.tmp
sed -e "s,$prefix,$new_prefix,g" < $file > $file.tmp
mv -f $file.tmp $file
+ else
+ echo "Not doing anything with $file"
fi
done