#!/bin/sh
#
#  This script generates a minimal binary distribution of LILO 0.12
#  The README is considered an essential part of LILO, as is QuickInst
#
if [ ! -f lilo.12.tar.gz ]; then
    echo "lilo.12.tar.gz must be in the current directory."
    exit 1
fi
rm -rf LILO
mkdir LILO
cd LILO
tar xvfz ../lilo.12.tar.gz
mv lilo/* .
rmdir lilo
mkdir d
export ROOT=`pwd`/d
mkdir $ROOT/etc
make install
strip $ROOT/etc/lilo/lilo
strip activate
cp install.new $ROOT/etc/lilo/install
mkdir $ROOT/usr $ROOT/usr/src $ROOT/usr/src/lilo
cp README QuickInst activate $ROOT/usr/src/lilo
cd $ROOT
tar cvf - etc/lilo usr/src/lilo | gzip -9 >../../lilo-bin.tgz
cd ../..
rm -rf LILO
