#!/bin/sh
dst=$1
scanner=${2:-src/scanner/dist.pl}
find /bin /sbin /usr/bin /usr/sbin /usr/lib -type f -print0 \
| xargs -r0 file \
| sed -ne 's/: *ELF 32-bit [LM]SB executable,.*//p' \
| ( ${scanner} 2>&1 ) \
| tee ${dst}.full \
| tail -1 \
> ${dst}
