2016-12-19 19:08:11 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ -z $1 ]; then
|
|
|
|
echo "Please specify path"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
which chrpath &> /dev/null
|
|
|
|
|
|
|
|
if [ $? -ne 0 ] ; then
|
|
|
|
echo "Please install chrpath tool"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2017-01-13 22:11:56 +01:00
|
|
|
libs=$(find $1 -type f -name \*.so\*)
|
2016-12-19 19:08:11 +01:00
|
|
|
execs=$(find $1 -type f -path \*/bin/\* )
|
|
|
|
|
|
|
|
for i in $libs $execs; do
|
|
|
|
chrpath $i 2> /dev/null | grep -q build-root
|
|
|
|
if [ $? -eq 0 ] ; then
|
2017-01-13 20:58:19 +01:00
|
|
|
chrpath -d $i
|
2016-12-19 19:08:11 +01:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|