Skip to content
Snippets Groups Projects
Commit c529d427 authored by François Bailly's avatar François Bailly
Browse files

Adding searchLib.sh, a script for sorting dependencies of librairies

parent 0cc1d60b
No related branches found
No related tags found
No related merge requests found
...@@ -65,3 +65,14 @@ The first allows to check that the camera is configured correctly. ...@@ -65,3 +65,14 @@ The first allows to check that the camera is configured correctly.
If you are not satisfied, you have to use the [web interface](http://axis-ptz1). If you are not satisfied, you have to use the [web interface](http://axis-ptz1).
The second records the current view. It is meant to be run in `eur0c:/local/axis` The second records the current view. It is meant to be run in `eur0c:/local/axis`
## `searchLib.sh`
```
usage: searchLib.sh my_lib version_to_avoid
This script searches all the .so files in the current directory.
The first arg is a string contained in the dependencies of the library you are looking for.
The second arg is a string contained in the dependencies that you want to reject.
The script will display the names of the .so files which meet these criteria.
```
#!/bin/bash
# This script searches all the .so files in the current directory.
# The first arg is a string contained in the dependencies of the library you are looking for.
# The second arg is a string contained in the dependencies that you want to reject.
# The script will display the names of the .so files which meet these criteria.
# Ex: searchLib.sh my_lib version_to_avoid
set +e
w=`find . -name "*.so" -print`
for v in $w
do
#echo $v
out_v=`basename $v`.txt
#echo $out_v
ldd $v > /tmp/$out_v
grep -nH $1 /tmp/$out_v | grep -v $2 &> /tmp/test
if [ -s /tmp/test ]
then
echo $v
fi
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment