debian-cd-clone/tools/add-bin-doc

80 lines
2.2 KiB
Plaintext
Raw Normal View History

#!/bin/bash
#set -x
set -e
BDIR=$TDIR/$CODENAME-$ARCH
ADIR=$APTTMP/$CODENAME-$ARCH
SDIR=$TDIR/$CODENAME-src
DEBMAINVER="`echo $DEBVERSION | sed -e 's/[ _r].*//'`"
for i in $BDIR/*.packages; do
dir=${i%%.packages}
dir=${dir##$BDIR/}
dir=$BDIR/CD$dir
cp -df $MIRROR/README* $dir/
if [ -f $dir/doc/dedication-$DEBMAINVER.txt ]; then
mv $dir/doc/dedication-$DEBMAINVER.txt $dir/dedication.txt
ln -s ../dedication.txt $dir/doc/dedication-$DEBMAINVER.txt
fi
rm -f $dir/README $dir/README.1ST \
$dir/README.CD-manufacture $dir/README.multicd \
$dir/README.pgp ; \
cpp -traditional -undef -P -C -Wall -nostdinc -I$dir \
-D OUTPUTtext $BASEDIR/data/$CODENAME/README.html.in \
| sed -e 's/%%.//g' > $dir/README.html
lynx -dump -force_html $dir/README.html | todos \
> $dir/README.txt ; \
cpp -traditional -undef -P -C -Wall -nostdinc -I $dir/ \
-D OUTPUThtml $BASEDIR/data/$CODENAME/README.html.in \
| sed -e 's/%%.//g' > $dir/README.html
rm -f $dir/README.diskdefines
mkdir -p $dir/pics
cp $BASEDIR/data/pics/*.* $dir/pics/
if [ -e $MIRROR/dists/$CODENAME/main/Release-Notes ]; then
cp -f $MIRROR/dists/$CODENAME/main/Release-Notes $dir/
fi
if [ -e $MIRROR/dists/$CODENAME/Contents-$ARCH.gz ]; then
cp -f $MIRROR/dists/$CODENAME/Contents-$ARCH.gz $dir/dists/$CODENAME/
else
echo "WARNING: there's no Contents-$ARCH.gz file for $CODENAME !"
fi
if [ -n "$NONUS" ]
then
if [ -e $NONUS/dists/$CODENAME/non-US/Contents-$ARCH.gz ]; then
cp -f $NONUS/dists/$CODENAME/non-US/Contents-$ARCH.gz \
$dir/dists/$CODENAME/non-US/
else
echo "WARNING: there's no Content-$ARCH.gz file for $CODENAME/non-US !"
fi
fi
if [ -e $BASEDIR/data/$CODENAME/README.$ARCH ]; then
cp -f $BASEDIR/data/$CODENAME/README.$ARCH $dir/
fi
if [ -e $BASEDIR/data/$CODENAME/README.1ST.$ARCH ]; then
rm -f $dir/README.1ST
echo "This disc is labelled :" > $dir/README.1ST
cat $dir/.disk/info >>$dir/README.1ST
echo -e "\n\n" >>$dir/README.1ST
cat $BASEDIR/data/$CODENAME/README.1ST.$ARCH > $dir/README.1ST
todos $dir/README.1ST;
fi
if [ -e $BASEDIR/data/$CODENAME/README.multicd ]; then
cp -f $BASEDIR/data/$CODENAME/README.multicd $dir/
fi
done