blob: bda3d60d7455a58a088ba4773286cace504f79cd [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
15libs=$(find $1 -type f -name \*.so)
16execs=$(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
21 chrpath $i
22 fi
23done
24