File: copysharedlibs.sh

package info (click to toggle)
freefem%2B%2B 3.31-2-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 23,548 kB
  • ctags: 18,473
  • sloc: cpp: 128,292; ansic: 22,605; sh: 4,806; makefile: 2,648; fortran: 1,123; perl: 747; awk: 163
file content (24 lines) | stat: -rwxr-xr-x 461 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
# Find out which shared libs an executable needs and copy them
# Antoine Le Hyaric - LJLL Paris 6 - lehyaric@ann.jussieu.fr - 22/11/04
# $Id$

# $1=executable to analyze
if test ! -x $1
then
    echo $1 is not an executable
    exit 1
fi

# $2= where to copy shared libs
if test ! -d $2
then
    echo $2 is not a directory
fi

# List all shared libs
libs=`ldd $1|awk '{print $3}'`
if test "$libs" != "dynamic" -a "$libs" != ""
then
    cp $libs $2
fi