File: getdependencies

package info (click to toggle)
brewtarget 4.2.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 35,468 kB
  • sloc: cpp: 56,958; xml: 19,031; python: 1,266; sh: 183; makefile: 11
file content (28 lines) | stat: -rwxr-xr-x 488 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

EXECUTABLE=${1}

# Check input arguments.
if [ -z ${EXECUTABLE} ]
then
  echo -e "Usage: ./getdependencies <executable>";
  exit 1;
fi

which dpkg-shlibdeps > /dev/null 2> /dev/null;
if [ ! $? ]
then
  echo "You don't have dpkg-shlibdeps";
  exit 1;
fi

if [ ! -e ${EXECUTABLE} ]
then
  echo "${EXECUTABLE} does not exist";
  exit 1;
fi

dpkg-shlibdeps ${EXECUTABLE} -dDepends -Tsubstvars > /dev/null 2> /dev/null;
cat substvars | sed 's/shlibs[:]Depends=//';
rm substvars;