File: copysharedlibs.sh

package info (click to toggle)
freefem++ 3.61.1+dfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 17,108 kB
  • sloc: cpp: 141,214; ansic: 28,664; sh: 4,925; makefile: 3,142; fortran: 1,171; perl: 844; awk: 290; php: 199; pascal: 41; f90: 32
file content (24 lines) | stat: -rwxr-xr-x 461 bytes parent folder | download | duplicates (5)
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