#!/bin/bash

# $Progeny: installtools.sh,v 1.2 2002/02/11 21:07:38 epg Exp $

# Install files in /install and some in /doc
# 26-dec-99 changes for i386 (2.2.x) bootdisks --jwest
# 11-mar-00 added sparc to boot-disk documentation test  --jwest
# 30-jun-00 synced with potato updates --jwest
# 05-JUL-00 added CODENAME1 and test for existance of woody bootdisks --jwest

set -ex

# The location of the tree for CD#1, passed in
DIR=$1

DOCDIR=doc

if [ -e $BOOTDISKS/current/$DOCDIR ] ; then
        DOCS=$BOOTDISKS/current/$DOCDIR
else
        echo "Using potato bootdisk documentation"
        DOCS=$MIRROR/dists/potato/main/disks-$ARCH/current/$DOCDIR
fi


# Put the install documentation in /install
cd $DOCS
mkdir -p $DIR/install/$DOCDIR
cp -a * $DIR/install/$DOCDIR/
ln -sf install.en.html $DIR/install/$DOCDIR/index.html

# Put the boot-disk documentation in /doc too
mkdir -p $DIR/doc/install
cd $DIR/doc/install
for file in ../../install/$DOCDIR/*.{html,txt}
do
	ln -s $file
done

