blob: 3912b37044825018a7b1a10d9f8b303e048de197 [file] [log] [blame]
Damjan Mariona1bd0232016-12-19 19:08:11 +01001#!/bin/bash
2
3if [ -z $1 ]; then
4 echo "Please specify path"
5 exit 1
6fi
7
8which chrpath &> /dev/null
9
10if [ $? -ne 0 ] ; then
11 echo "Please install chrpath tool"
12 exit 1
13fi
14
Damjan Marion5a3a6c02017-01-13 22:11:56 +010015libs=$(find $1 -type f -name \*.so\*)
Damjan Mariona1bd0232016-12-19 19:08:11 +010016execs=$(find $1 -type f -path \*/bin/\* )
17
18for i in $libs $execs; do
19 chrpath $i 2> /dev/null | grep -q build-root
20 if [ $? -eq 0 ] ; then
Damjan Marion3f1309d2017-01-13 20:58:19 +010021 chrpath -d $i
Damjan Mariona1bd0232016-12-19 19:08:11 +010022 fi
23done
24