1 #!/bin/sh
3 libs=`grep libebook.*\.so build/connectivity/source/drivers/evoab2/EApi.cxx | perl -pe 's/\s+\"(.*)\".*/$1/'`
5 for l in $libs; do
6 if [ -e "/usr/lib/$l" ]; then
7 # sanity check: do the libs match with what we would get
8 # for our libebook version if we followed the .so symlink?
9 l1=`readlink /usr/lib/$l`
10 l2_tmp=`echo $l | perl -pe 's/(.*)\.\d+$/$1/'`
11 l2=`readlink /usr/lib/$l2_tmp`
12 if [ "$l1" = "$l2" ]; then
13 dep=`dpkg -S /usr/lib/$l | cut -d: -f1`
14 fi
15 fi
16 done
18 if [ -n "$dep" ]; then
19 echo $dep
20 else
21 echo "Cannot find libebook dependency. None of the following libs found:"
22 echo $libs
23 exit 1
24 fi
