#!/bin/sh # finddebconflict v0.01 # Con Kolivas # invoke with 'finddebconflict $debfile' # checks $debfile to see if it tries to install over files in already installed # packages. Good for custom made .debs not in a repository. outname=`date +%s`.deblist outname2="$outname"2 if [[ -f $outname || -f $outname2 ]]; then echo file exists exit 1 fi dpkg-deb --fsys-tarfile $1 | tar tf - > $outname if [[ $? -ne 0 ]]; then echo dpkg-deb failed... exiting exit 1 fi for i in `cat $outname` do dpkg -S ${i:1} 2>&1 | grep -v "not found" | awk -F ':' '{ print $1 }' >> $outname2 done echo The following installed packages have files referenced by $1 cat $outname2 | sort -u rm $outname $outname2