Damjan Marion | a1bd023 | 2016-12-19 19:08:11 +0100 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | if [ -z $1 ]; then |
| 4 | echo "Please specify path" |
| 5 | exit 1 |
| 6 | fi |
| 7 | |
| 8 | which chrpath &> /dev/null |
| 9 | |
| 10 | if [ $? -ne 0 ] ; then |
| 11 | echo "Please install chrpath tool" |
| 12 | exit 1 |
| 13 | fi |
| 14 | |
Damjan Marion | 5a3a6c0 | 2017-01-13 22:11:56 +0100 | [diff] [blame] | 15 | libs=$(find $1 -type f -name \*.so\*) |
Damjan Marion | a1bd023 | 2016-12-19 19:08:11 +0100 | [diff] [blame] | 16 | execs=$(find $1 -type f -path \*/bin/\* ) |
| 17 | |
| 18 | for i in $libs $execs; do |
| 19 | chrpath $i 2> /dev/null | grep -q build-root |
| 20 | if [ $? -eq 0 ] ; then |
Damjan Marion | 3f1309d | 2017-01-13 20:58:19 +0100 | [diff] [blame] | 21 | chrpath -d $i |
Damjan Marion | a1bd023 | 2016-12-19 19:08:11 +0100 | [diff] [blame] | 22 | fi |
| 23 | done |
| 24 | |