| 1 | #!/bin/sh |
| 2 | |
| 3 | makefile=$(realpath debian/tests/Makefile.test) |
| 4 | scanner=test/frei0r-run |
| 5 | |
| 6 | #PLUGINDIR=/usr/lib/x86_64-linux-gnu/frei0r-1 |
| 7 | : "${DEB_HOST_MULTIARCH:=$(dpkg-architecture -qDEB_HOST_MULTIARCH)}" |
| 8 | |
| 9 | make -C test -f "${makefile}" \ |
| 10 | frei0r-run |
| 11 | |
| 12 | |
| 13 | checkdirs() { |
| 14 | for d in "$@"; do |
| 15 | if test -d "$d"; then echo "$d"; fi |
| 16 | done |
| 17 | } |
| 18 | |
| 19 | scanme() { |
| 20 | find "$@" \ |
| 21 | -type f -name '*.so' -exec "${scanner}" -d -p {} ";" |
| 22 | } |
| 23 | |
| 24 | if [ "$#" -gt 0 ]; then |
| 25 | scanme "$@" |
| 26 | else |
| 27 | find $(checkdirs "/usr/lib/${DEB_HOST_MULTIARCH}/frei0r-1" /usr/lib/frei0r ) \ |
| 28 | -type f -name '*.so' -exec "${scanner}" -d -p {} ";" |
| 29 | fi |