From 0da18ecb7fd1ea5da6ba4f04f23c0c89593e628c Mon Sep 17 00:00:00 2001 From: Steve McIntyre <93sam@debian.org> Date: Sat, 18 Dec 2010 16:39:29 +0000 Subject: [PATCH] copy the lenny code for adding the installation guide etc --- tools/squeeze/installtools.sh | 72 +++++++++++++++++++++++++++++++++++ tools/squeeze/upgrade.sh | 6 +++ 2 files changed, 78 insertions(+) create mode 100755 tools/squeeze/installtools.sh create mode 100755 tools/squeeze/upgrade.sh diff --git a/tools/squeeze/installtools.sh b/tools/squeeze/installtools.sh new file mode 100755 index 00000000..54a3369f --- /dev/null +++ b/tools/squeeze/installtools.sh @@ -0,0 +1,72 @@ +#!/bin/bash +# Install files in /install and some in /doc + +set -e + +if [ "$RELEASE_NOTES_LOCATION"x = ""x ] ; then + export RELEASE_NOTES_LOCATION="http://www.debian.org/releases/lenny" +fi + +# The location of the tree for CD#1, passed in +DIR=$1 +ARCHES="$2" +NUM_ARCHES=`echo $ARCHES | wc -w` + +if [ "$OMIT_MANUAL" != 1 ]; then + DOCDIR=doc + MANTDIR=$TDIR/installguide + + for ARCH in $ARCHES + do + if [ $ARCH != source ] ; then + if [ $NUM_ARCHES = 1 ] ; then + INSTALLDIR=$DIR/$DOCDIR/manual + else + INSTALLDIR=$DIR/$DOCDIR/manual/$ARCH + fi + + INSTALLGUIDE=$(zcat $MIRROR/dists/$CODENAME/main/binary-$ARCH//Packages.gz | \ + sed -n "s/Filename: \(pool\/main\/i\/installation-guide\/installation-guide-$ARCH.*deb\)$/\1/p") + + if [ -f "$MIRROR/$INSTALLGUIDE" ]; then + rm -rf $MANTDIR + # Extract documentation from package + dpkg -x $MIRROR/$INSTALLGUIDE $MANTDIR || true + if [ -d $MANTDIR/usr/share/doc/installation-guide-$ARCH/ ]; then + cd $MANTDIR/usr/share/doc/installation-guide-$ARCH + rm -f changelog* copyright + find . -name '*.gz' | xargs gunzip || true + + mkdir -p $INSTALLDIR + if ! cp -a * $INSTALLDIR; then + echo "ERROR: Unable to copy installer documentation to CD." + fi + else + echo "ERROR: installation-guide package not unpacked correctly." + fi + else + echo "ERROR: package installation-guide-$ARCH not found." + fi + fi + done +fi + +if [ "$OMIT_RELEASE_NOTES" != 1 ]; then + for ARCH in $ARCHES + do + if [ $ARCH != source ] ; then + RN=$DIR/doc/release-notes + mkdir -p $RN + cd $RN + echo "Downloading most recent release notes for $ARCH" + wget $RELEASE_NOTES_LOCATION/release-notes-$ARCH.tar.gz + if [ -e release-notes-$ARCH.tar.gz ] ; then + tar xzvf release-notes-$ARCH.tar.gz + rm -f release-notes-$ARCH.tar.gz + rm -f */*.ps + else + echo "No release notes found at $RELEASE_NOTES_LOCATION/release-notes-$ARCH.tar.gz" + fi + fi + done +fi diff --git a/tools/squeeze/upgrade.sh b/tools/squeeze/upgrade.sh new file mode 100755 index 00000000..79b97c65 --- /dev/null +++ b/tools/squeeze/upgrade.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# FOR ETCH +# Include upgrade* dir when available + +exit 0