Simplified boot-powerpc copying stuff a bit.

Added support for cdrom-minimal images copying.
This commit is contained in:
Sven Luther 2004-09-20 19:51:24 +00:00
parent f5f49b5527
commit 3fa03ffcd3
1 changed files with 16 additions and 13 deletions

View File

@ -80,27 +80,30 @@ cp $BASEDIR/data/sarge/yaboot/ofboot.b ofboot.b
for subarch in powerpc power3 power4
do
if [ ! "$DI_WWW_HOME" ];then
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/$subarch/cdrom"
cp -a "$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/$subarch/cdrom" "$subarch"
if [ "$subarch" = "powerpc" ]; then
cp -a "$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images/$subarch/cdrom-minimal" "$subarch/minimal"
fi
else
DI_DIR="di_stuff"
wget -r -nd --no-parent --level=1 -P "$DI_DIR" "$DI_WWW_HOME/$subarch/cdrom/"
wget -r -nd --no-parent --level=1 -P "$subarch" "-R index* $DI_WWW_HOME/$subarch/cdrom/"
# One of these two wgets will fail; the price of maintaining
# compatibility. The 2.4/2.6 duplication can go away once the new
# debian-installer image layout reaches sarge.
wget -r -nd --no-parent --level=1 -P "$DI_DIR/2.4" "$DI_WWW_HOME/$subarch/cdrom/2.4/"
wget -r -nd --no-parent --level=1 -P "$DI_DIR/2.6" "$DI_WWW_HOME/$subarch/cdrom/2.6/"
rm -f "$DI_DIR"/index* "$DI_DIR/2.4"/index* "$DI_DIR/2.6"/index*
if [ -d "$DI_DIR/2.6" ]; then
wget -r -nd --no-parent --level=1 -P "$subarch/2.4" -R index* "$DI_WWW_HOME/$subarch/cdrom/2.4/"
wget -r -nd --no-parent --level=1 -P "$subarch/2.6" -R index* "$DI_WWW_HOME/$subarch/cdrom/2.6/"
if [ $subarch = powerpc ]; then
wget -r -nd --no-parent --level=1 -P "$subarch/minimal" -R index* "$DI_WWW_HOME/$subarch/cdrom-minimal/"
wget -r -nd --no-parent --level=1 -P "$subarch/minimal/2.4" -R index* "$DI_WWW_HOME/$subarch/cdrom-minimal/2.4/"
fi
if [ -d "$subarch/2.6" ]; then
# Cope with old debian-installer image layout from before 2.6
# became the default.
mkdir -p "$DI_DIR/2.4"
find "$DI_DIR" -type f -maxdepth 1 | xargs -r mv --target-directory="$DI_DIR/2.4"
find "$DI_DIR/2.6" -type f -maxdepth 1 | xargs -r mv --target-directory="$DI_DIR"
rm -rf "$DI_DIR/2.6"
mkdir -p "$subarch/2.4"
find "$subarch" -type f -maxdepth 1 | xargs -r mv --target-directory="$subarch/2.4"
find "$subarch/2.6" -type f -maxdepth 1 | xargs -r mv --target-directory="$subarch"
rm -rf "$subarch/2.6"
fi
fi
cp -a "$DI_DIR" "$subarch"
rm -rf di_stuff
done
exit 0