make install watcher
gerard at linuxfromscratch.org
Tue Jan 9 17:56:43 PST 2001
On January 9, 2001 09:36 am, Bryan Dumm wrote:
> Ron885 brought this link up...
> I read about the program before, but lost it my mess called
> "archives". Anyways check it out, as it might be useful for
> package management things.....
It required installwatch, another binary on the system. A simple script can
do the same and I hve grown quite fond of the following script based on the
find-ideas by Jesse Tie Ten Quee. What it does is this:
you run it, it will collect all files current on the system (excluding a few
directories like tarball directrory, proc, dev, mnt). It will then pause so
you can run your make install process. Then you hit a key and it will collect
all files currently on the system. It then compares the two outputs (using
diff) and writes the diff to a file. Then modify this file (to remove those >
symbols diff puts in there) a bit and done. This file can then be piped
through xargs to remove it (read a line from the output file, run 'rm' on it.
Read next line, run 'rm' on it, until EOF).
if [ -z $1 ]
echo "Usage: $0 outputfile"
PRUNEPATH="/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
echo "Collecting current files..."
find / -regex "$PRUNEREGEX" -prune -o -print > /var/install-logs/before-inst
echo "Start the installation now. Press a key when you are done to
echo "Collecting new files..."
find / -regex "$PRUNEREGEX" -prune -o -print > /var/install-logs/after-inst
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..."
-*- If Linux doesn't have the solution, you have the wrong problem -*-
More information about the alfs-discuss