comparison deploy/linux/deploy-appimage.sh @ 1890:fb9a63059d25 appimage

Attempt to handle libraries in /lib. I have a bad feeling about this
author Chris Cannam
date Wed, 27 Jun 2018 21:08:26 +0100
parents d8dfd30d6d41
children 8ce9fd471188
comparison
equal deleted inserted replaced
1889:d8dfd30d6d41 1890:fb9a63059d25
24 24
25 ldd /usr/lib/x86_64-linux-gnu/libpulse.so.0 || true 25 ldd /usr/lib/x86_64-linux-gnu/libpulse.so.0 || true
26 26
27 add_dependencies() { 27 add_dependencies() {
28 local binary="$1" 28 local binary="$1"
29 for lib in $(ldd "$binary" | grep '=> /usr/lib/' | sed 's/^.*=> //' | sed 's/ .*$//' | grep -v 'libc.so' | grep -v 'libm.so'); do 29 for lib in $(ldd "$binary" | egrep '=> (/usr)?/lib/' | sed 's/^.*=> //' | sed 's/ .*$//' | grep -v 'libc.so' | grep -v 'libm.so'); do
30 mkdir -p "$targetdir/$(dirname $lib)" 30 mkdir -p "$targetdir/$(dirname $lib)"
31 if [ ! -f "$targetdir/$lib" ]; then 31 if [ ! -f "$targetdir/$lib" ]; then
32 cp -Lv "$lib" "$targetdir/$lib" 32 cp -Lv "$lib" "$targetdir/$lib"
33 chmod +x "$targetdir/$lib" 33 chmod +x "$targetdir/$lib"
34 add_dependencies "$lib" 34 add_dependencies "$lib"