|
OLD | NEW |
---|---|
(Empty) | |
1 #!/bin/bash | |
2 # | |
3 # Changes all RPATHs from XORIGIN to $ORIGIN | |
Alexander Potapenko
2013/10/29 13:36:11
"all RPATHs in a given directory"
alextaran1
2013/10/30 11:16:29
Done.
| |
4 | |
5 # Fixes rpath from XORIGIN to $ORIGIN in a single file $1 | |
Alexander Potapenko
2013/10/29 13:36:11
Period at the end of the comment here and everywhe
alextaran1
2013/10/30 11:16:29
Done.
| |
6 function fix_rpath { | |
7 chrpath -r $(chrpath $1 | cut -d " " -f 2 | sed s/XORIGIN/\$ORIGIN/g \ | |
8 | sed s/RPATH=//g) $1 | |
9 } | |
10 | |
11 for i in $(find $1 | grep "\.so$"); do | |
12 fix_rpath $i > /dev/null | |
Alexander Potapenko
2013/10/29 13:36:11
Why suppress the output? Does chrpath print too mu
alextaran1
2013/10/30 11:16:29
It prints 2 lines for each file: old rpath and new
| |
13 done | |
14 | |
15 # Mark that rpaths are fixed | |
16 touch $1/rpaths.fixed.txt | |
OLD | NEW |