2 # By Gerard Beekmans <gerard@linuxfromscratch.org>
4 [ -x /usr
/bin
/clear ] && clear
8 echo "Usage: $0 [-c5] {package}"
9 echo "-c5: use with LFS-Book Chapter 5 installation: use \$LFS"
10 echo " as the root directory instead of /"
11 echo "package: the package whose installation you wish to log"
22 -c5) if [ -z "$c5" ]; then c5
="c5-"; fi
24 if [ -z "$pkgname" ]; then pkgname
=$c5$pkgname; fi
28 pkgname
=$c5$1 && shift
33 [ -z "$pkgname" ] && show_help
35 [ -n "$c5" ] && root
="$LFS"
37 install_log
=$root/usr
/share
/checklfs
/install-logs
/$pkgname
38 tmpfile
=$root/tmp
/tmpfile
39 PRUNEPATH
="$root/proc $root/usr/src $root/tmp $root/usr/tmp $root/var/tmp
40 $root/root $root/home $root/usr/share/checklfs $root/mnt $root/dev"
41 PRUNEREGEX
=`echo $PRUNEPATH | \
42 sed -e 's,^,\\\(^,' -e 's, ,$\\\)\\\|\\\(^,g' -e 's,$,$\\\),'`
48 echo "Start the installation of $pkgname now."
49 echo "Press Enter when the package is installed."
52 echo "Obtaining list of new and changed files..."
53 find $root/ -regex "$PRUNEREGEX" -prune -o -cnewer $tmpfile -print \
58 sed s
%$LFS%% $install_log > $install_log.tmp
59 mv $install_log.tmp
$install_log
64 [ -x /usr
/bin
/vim
] && vim
$install_log