local InstallPath="$1"
for Candidate in `find $InstallPath/{bin,lib} -type f`; do
if file $Candidate | grep ELF | egrep 'executable|shared object' > /dev/null 2>&1 ; then
- rpath=`objdump -x $Candidate | grep 'RPATH' | sed -e's/^ *RPATH *//'`
- if [ -n "$rpath" ]; then
- newrpath=`echo $rpath | sed -e's/.*\(\$ORIGIN[^:]*\).*/\1/'`
- chrpath -r $newrpath $Candidate 2>&1 > /dev/null 2>&1
+ if rpath=`objdump -x $Candidate | grep 'RPATH'` ; then
+ rpath=`echo $rpath | sed -e's/^ *RPATH *//'`
+ if [ -n "$rpath" ]; then
+ newrpath=`echo $rpath | sed -e's/.*\(\$ORIGIN[^:]*\).*/\1/'`
+ chrpath -r $newrpath $Candidate 2>&1 > /dev/null 2>&1
+ fi
fi
fi
done
function package_release() {
cwd=`pwd`
cd $BuildDir/Phase3/Release
- mv llvmCore-$Release-$RC.install $Package
+ mv llvmCore-$Release-$RC.install/usr/local $Package
if [ "$use_gzip" = "yes" ]; then
tar cfz $BuildDir/$Package.tar.gz $Package
else
tar cfJ $BuildDir/$Package.tar.xz $Package
fi
- mv $Package llvmCore-$Release-$RC.install
+ mv $Package llvmCore-$Release-$RC.install/usr/local
cd $cwd
}
# Substitute 'Phase2' for 'Phase3' in the Phase 2 object file in
# case there are build paths in the debug info. On some systems,
# sed adds a newline to the output, so pass $p3 through sed too.
- if ! cmp --ignore-initial=16 <(sed -e 's,Phase2,Phase3,g' $p2) \
- <(sed -e '' $p3) > /dev/null 2>&1 ; then
+ if ! cmp -s <(sed -e 's,Phase2,Phase3,g' $p2) <(sed -e '' $p3) \
+ 16 16 ; then
echo "file `basename $p2` differs between phase 2 and phase 3"
fi
done