#!/bin/sh if [ -z $1 ] then echo "Usage: $0 outputfile" exit 1 fi clear PRUNEPATH="/old /download /usr/src /proc /var/install-logs /tmp /root /home /var/run /dev /mnt /var/spool /var/lock " PRUNEREGEX=`echo $PRUNEPATH|sed -e 's,^,\\\(^,' -e 's, ,$\\\)\\\|\\\(^,g' -e 's,$,$\\\),'` echo "Collecting current files..." find / -regex "$PRUNEREGEX" -prune -o -print > /var/install-logs/before-inst echo echo "Start the installation of $1 now." echo "Press a key when you are done to continue..." read echo "Collecting new files..." find / -regex "$PRUNEREGEX" -prune -o -print > /var/install-logs/after-inst cd /var/install-logs echo "Creating difference output.." diff before-inst after-inst > $1 echo "Modifying difference output file..." sed s/"> "// $1 > $1-new mv $1-new $1 cat $1 | grep / > $1-new mv $1-new $1 echo "Removing temporary files..." rm before-inst after-inst echo "Opening output file in editor..." gvim $1 echo "Done"