Indent cleanup

This commit is contained in:
Steve McIntyre 2015-02-03 02:15:20 +00:00
parent 6ada498416
commit a46cc618f8
1 changed files with 89 additions and 90 deletions

View File

@ -54,9 +54,9 @@ case "$MKISOFS" in
XORRISO_VER=$(xorriso_version) XORRISO_VER=$(xorriso_version)
;; ;;
*) *)
echo "ERROR: debian-cd now depends on xorriso for making x86 bootable CDs." echo "ERROR: debian-cd now depends on xorriso for making x86 bootable CDs."
exit 1; exit 1;
;; ;;
esac esac
cd $CDDIR/.. cd $CDDIR/..
@ -76,109 +76,109 @@ INSTALLDIR_i386="install.386"
INSTALLDIR_amd64="install.amd" INSTALLDIR_amd64="install.amd"
if [ "$ARCH" = i386 ]; then if [ "$ARCH" = i386 ]; then
INSTALLDIR="$INSTALLDIR_i386" INSTALLDIR="$INSTALLDIR_i386"
else else
INSTALLDIR="$INSTALLDIR_amd64" INSTALLDIR="$INSTALLDIR_amd64"
fi fi
BOOT_IMAGES="cdrom/initrd.gz cdrom/vmlinuz cdrom/debian-cd_info.tar.gz" BOOT_IMAGES="cdrom/initrd.gz cdrom/vmlinuz cdrom/debian-cd_info.tar.gz"
# Download boot images. # Download boot images.
for image in $BOOT_IMAGES; do for image in $BOOT_IMAGES; do
if [ ! -e "$image" ]; then if [ ! -e "$image" ]; then
dir=$(dirname $image) dir=$(dirname $image)
mkdir -p $dir mkdir -p $dir
if [ -n "$LOCAL" -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then if [ -n "$LOCAL" -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image" cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
elif [ ! "$DI_WWW_HOME" ];then elif [ ! "$DI_WWW_HOME" ];then
if [ ! "$DI_DIR" ];then if [ ! "$DI_DIR" ];then
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images" DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
fi fi
# echo "Copying images from $DI_DIR" # echo "Copying images from $DI_DIR"
cp "$DI_DIR/$image" "$image" cp "$DI_DIR/$image" "$image"
else else
wget "$DI_WWW_HOME/$image" -O "$image" wget "$DI_WWW_HOME/$image" -O "$image"
fi fi
fi fi
done done
# Images that are not really required or may be unavailable. # Images that are not really required or may be unavailable.
for image in $DISK_IMAGES $EXTRA_DISK_IMAGES; do for image in $DISK_IMAGES $EXTRA_DISK_IMAGES; do
if [ ! -e "$image" ]; then if [ ! -e "$image" ]; then
dir=$(dirname $image) dir=$(dirname $image)
mkdir -p $dir mkdir -p $dir
if [ -n "$LOCAL" -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then if [ -n "$LOCAL" -a -f "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" ]; then
cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image" cp "${LOCALDEBS:-$MIRROR}/dists/$DI_DIST/local/installer-$ARCH/current/images/$image" "$image"
elif [ ! "$DI_WWW_HOME" ];then elif [ ! "$DI_WWW_HOME" ];then
if [ ! "$DI_DIR" ];then if [ ! "$DI_DIR" ];then
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images" DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
fi fi
cp "$DI_DIR/$image" "$image" || true cp "$DI_DIR/$image" "$image" || true
else else
wget "$DI_WWW_HOME/$image" -O "$image" || rm -f "$image" wget "$DI_WWW_HOME/$image" -O "$image" || rm -f "$image"
fi fi
fi fi
done done
# Only disk one gets the extra files installed # Only disk one gets the extra files installed
if [ "$NN" = "1" ]; then if [ "$NN" = "1" ]; then
# populate the install directory as well # populate the install directory as well
for disk in $DISK_IMAGES $EXTRA_DISK_IMAGES; do for disk in $DISK_IMAGES $EXTRA_DISK_IMAGES; do
if [ -e "$disk" ]; then if [ -e "$disk" ]; then
dir=$(dirname $disk) dir=$(dirname $disk)
mkdir -p $CDDIR/$INSTALLDIR/$dir mkdir -p $CDDIR/$INSTALLDIR/$dir
cp -lf $disk $CDDIR/$INSTALLDIR/$dir cp -lf $disk $CDDIR/$INSTALLDIR/$dir
fi fi
done done
if [ -e "$MIRROR/tools" ] && \ if [ -e "$MIRROR/tools" ] && \
[ ! -e $CDDIR/tools ] && \ [ ! -e $CDDIR/tools ] && \
[ "$OMIT_DOC_TOOLS" != "1" ] ; then [ "$OMIT_DOC_TOOLS" != "1" ] ; then
echo " Adding tools to CD1" echo " Adding tools to CD1"
$BASEDIR/tools/add_files $CDDIR $MIRROR tools $BASEDIR/tools/add_files $CDDIR $MIRROR tools
# Remove the win32-loader/ subdirectory from tools, as d-i already installs setup.exe # Remove the win32-loader/ subdirectory from tools, as d-i already installs setup.exe
rm -Rf $CDDIR/tools/win32-loader rm -Rf $CDDIR/tools/win32-loader
fi fi
fi fi
extra_image () { extra_image () {
image=$1 image=$1
doppelgangers="$2" doppelgangers="$2"
dir=$(dirname "$image") dir=$(dirname "$image")
mkdir -p $CDDIR/$INSTALLDIR/$dir mkdir -p $CDDIR/$INSTALLDIR/$dir
if [ ! -e $CDDIR/$INSTALLDIR/"$image" ] ; then if [ ! -e $CDDIR/$INSTALLDIR/"$image" ] ; then
if [ ! "$DI_WWW_HOME" ] ; then if [ ! "$DI_WWW_HOME" ] ; then
if [ ! "$DI_DIR" ] ; then if [ ! "$DI_DIR" ] ; then
DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images" DI_DIR="$MIRROR/dists/$DI_DIST/main/installer-$ARCH/current/images"
fi fi
cp "$DI_DIR/cdrom/$image" $CDDIR/$INSTALLDIR/"$image" cp "$DI_DIR/cdrom/$image" $CDDIR/$INSTALLDIR/"$image"
else else
wget "$DI_WWW_HOME/cdrom/$image" -O $CDDIR/$INSTALLDIR/"$image" wget "$DI_WWW_HOME/cdrom/$image" -O $CDDIR/$INSTALLDIR/"$image"
fi fi
fi fi
for doppelganger in $doppelgangers ; do for doppelganger in $doppelgangers ; do
if [ -f "$CDDIR/$INSTALLDIR/$dir/$doppelganger" ] && if [ -f "$CDDIR/$INSTALLDIR/$dir/$doppelganger" ] &&
cmp -s $CDDIR/$INSTALLDIR/"$image" $CDDIR/$INSTALLDIR/"$dir"/"$doppelganger" ; then cmp -s $CDDIR/$INSTALLDIR/"$image" $CDDIR/$INSTALLDIR/"$dir"/"$doppelganger" ; then
echo " $image identical to $doppelganger. Linking" echo " $image identical to $doppelganger. Linking"
ln -nf $CDDIR/$INSTALLDIR/"$dir"/"$doppelganger" $CDDIR/$INSTALLDIR/"$image" ln -nf $CDDIR/$INSTALLDIR/"$dir"/"$doppelganger" $CDDIR/$INSTALLDIR/"$image"
break break
fi fi
done done
} }
case "$DESKTOP" in case "$DESKTOP" in
$UNSPEC_DESKTOP_DEFAULT) $UNSPEC_DESKTOP_DEFAULT)
# default from tasksel # default from tasksel
DESKTOP= DESKTOP=
;; ;;
all) all)
# default from tasksel # default from tasksel
DESKTOP= DESKTOP=
;; ;;
light) light)
DESKTOP=xfce DESKTOP=xfce
;; ;;
esac esac
# desktop boot parameter gets set separately through DESKTOP variable # desktop boot parameter gets set separately through DESKTOP variable
KERNEL_PARAMS="$(echo "$KERNEL_PARAMS" | sed -r "s/desktop=[^ ]* ?//")" KERNEL_PARAMS="$(echo "$KERNEL_PARAMS" | sed -r "s/desktop=[^ ]* ?//")"
@ -187,7 +187,7 @@ mkdir -p $CDDIR/$INSTALLDIR
cp -lf cdrom/vmlinuz $CDDIR/$INSTALLDIR/ cp -lf cdrom/vmlinuz $CDDIR/$INSTALLDIR/
cp -lf cdrom/initrd.gz $CDDIR/$INSTALLDIR/ cp -lf cdrom/initrd.gz $CDDIR/$INSTALLDIR/
if [ -e $CDDIR/tools/loadlin.exe ]; then if [ -e $CDDIR/tools/loadlin.exe ]; then
echo "\\tools\\loadlin.exe vmlinuz initrd=initrd.gz" | todos > $CDDIR/$INSTALLDIR/install.bat echo "\\tools\\loadlin.exe vmlinuz initrd=initrd.gz" | todos > $CDDIR/$INSTALLDIR/install.bat
fi fi
# In case of a multi-arch CD the script will be called two times. The # In case of a multi-arch CD the script will be called two times. The
@ -198,8 +198,8 @@ fi
MULTIARCH= MULTIARCH=
if [ -e boot$N/isolinux/isolinux.cfg ]; then if [ -e boot$N/isolinux/isolinux.cfg ]; then
MULTIARCH=1 MULTIARCH=1
rm -r boot$N/isolinux rm -r boot$N/isolinux
fi fi
mkdir -p boot$N/isolinux mkdir -p boot$N/isolinux
@ -238,7 +238,6 @@ EOF
@exit @exit
EOF EOF
fi fi
rm -f boot$N/isolinux/isolinux.cfg.with*
# Common mkisofs options when creating CDs # Common mkisofs options when creating CDs
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long" add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
@ -283,7 +282,6 @@ if [ "$BOOT_BIOS" = 1 ] ; then
cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/ldlinux.c32 boot$N/isolinux/ cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/ldlinux.c32 boot$N/isolinux/
cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/libcom32.c32 boot$N/isolinux/ cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/libcom32.c32 boot$N/isolinux/
cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/libutil.c32 boot$N/isolinux/ cp -f $CDDIR/../syslinux/usr/lib/syslinux/modules/bios/libutil.c32 boot$N/isolinux/
fi
# If we don't have grub stuff from d-i, tell xorriso to add a # If we don't have grub stuff from d-i, tell xorriso to add a
# partition offset for the isohybrid code # partition offset for the isohybrid code
@ -339,14 +337,15 @@ if variant_enabled "xen" ; then
extra_image xen/vmlinuz "../vmlinuz ../gtk/vmlinuz" extra_image xen/vmlinuz "../vmlinuz ../gtk/vmlinuz"
extra_image xen/initrd.gz "../initrd.gz ../gtk/initrd.gz" extra_image xen/initrd.gz "../initrd.gz ../gtk/initrd.gz"
extra_image xen/debian.cfg || extra_image xen/xm-debian.cfg extra_image xen/debian.cfg || extra_image xen/xm-debian.cfg
fi
if [ -z "$MULTIARCH" ]; then if [ -z "$MULTIARCH" ]; then
# Set up isolinux dir for only the current arch # Set up isolinux dir for only the current arch
grep -lr '%install%' boot$N/isolinux/* | xargs -r sed -i "s|%install%|$INSTALLDIR|" grep -lr '%install%' boot$N/isolinux/* | xargs -r sed -i "s|%install%|$INSTALLDIR|"
# Remove the amd*.cfg files to avoid them being loaded on a # Remove the amd*.cfg files to avoid them being loaded on a disc
# disc that does not have both amd64 and i386 dirs. # that does not have both amd64 and i386 dirs.
find boot$N/isolinux/ -name "amd*.cfg" -delete find boot$N/isolinux/ -name "amd*.cfg" -delete
else else
# Set up isolinux dir for multi-arch # Set up isolinux dir for multi-arch
grep -lr '%install[-amd]*%' boot$N/isolinux/* | xargs -r sed -i -e "s|%install%|$INSTALLDIR_i386|" -e "s|%install-amd%|$INSTALLDIR_amd64|" grep -lr '%install[-amd]*%' boot$N/isolinux/* | xargs -r sed -i -e "s|%install%|$INSTALLDIR_i386|" -e "s|%install-amd%|$INSTALLDIR_amd64|"