#!/bin/bash echo debian/man/ptscotch_esmumps.1 for dg in man/man1/dg*.1; do echo $dg done # separate scotch from ptscotch binaries PTSCOTCH_BINARIES=$( for f in debian/tmp/usr/bin/*; do if objdump -p $f | grep -q libptscotch.so; then echo `basename $f`; fi; done) for file in $PTSCOTCH_BINARIES; do p=debian/tmp/usr/share/man/man1/${file}.1 if [ -e $p ]; then echo $p fi done