diff --git a/scripts/README.md b/scripts/README.md index 96728e4657bd57881e0c39f29201c8ba7f19b93c..09091abbd44439826c2831487bdd031cf2b24d57 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -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). 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. +``` diff --git a/scripts/searchLib.sh b/scripts/searchLib.sh new file mode 100755 index 0000000000000000000000000000000000000000..02d08b969138fa2c12077983061b13b425c939df --- /dev/null +++ b/scripts/searchLib.sh @@ -0,0 +1,24 @@ +#!/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 +