diff options
| author | Dimitry Andric <dimitry@andric.com> | 2015-07-20 22:24:40 +0000 |
|---|---|---|
| committer | Dimitry Andric <dimitry@andric.com> | 2015-07-20 22:24:40 +0000 |
| commit | 52a143a5d91ef7793a5c49934a7cc75b86632e8a (patch) | |
| tree | 2f7158caf1225809e2588223937d2ce8aa6ccd9b /llvm/utils | |
| parent | 424452513ecf6947b0a5ae33c35b4c621020c7f2 (diff) | |
| download | bcm5719-llvm-52a143a5d91ef7793a5c49934a7cc75b86632e8a.tar.gz bcm5719-llvm-52a143a5d91ef7793a5c49934a7cc75b86632e8a.zip | |
Avoid early pipefail exits due to grep failures in stage comparisons.
If objects or executables did not contain any RPATH, grep would return
nonzero, and the whole stage comparison loop would unexpectedly exit.
Fix this by checking the grep result explicitly.
llvm-svn: 242722
Diffstat (limited to 'llvm/utils')
| -rwxr-xr-x | llvm/utils/release/test-release.sh | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/utils/release/test-release.sh b/llvm/utils/release/test-release.sh index 82264bc0999..2b4c51ce23d 100755 --- a/llvm/utils/release/test-release.sh +++ b/llvm/utils/release/test-release.sh @@ -359,10 +359,12 @@ function clean_RPATH() { 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 |

