Pull out some more common code into common.sh to simplify the various
boot-$arch scripts
This commit is contained in:
parent
3e0309bc85
commit
835cbca01b
|
@ -18,6 +18,8 @@ debian-cd (3.1.14) UNRELEASED; urgency=low
|
|||
* tools/update_tasks: don't hard-code the default desktop to use,
|
||||
instead work it out directly from the dependencies of the task-desktop
|
||||
package.
|
||||
* tools/boot/jessie/*: Pull out some more common code into common.sh to
|
||||
simplify the various boot-$arch scripts
|
||||
|
||||
[ Robert Spencer ]
|
||||
* Build without isolinux/desktop. Closes: #706150
|
||||
|
|
|
@ -26,14 +26,8 @@ N=$1
|
|||
CDDIR=$2
|
||||
BOOTDIR=
|
||||
if [ "$DI_WWW_HOME" = "default" ];then
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/alpha/daily/cdrom/"
|
||||
if [ -n "$DI_DIR" ];then
|
||||
DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}"
|
||||
DI_WWW_HOME=""
|
||||
fi
|
||||
fi
|
||||
if [ ! "$DI_DIST" ]; then
|
||||
DI_DIST="$DI_CODENAME"
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/alpha/daily/cdrom/"
|
||||
try_di_image_cache
|
||||
fi
|
||||
|
||||
cd $CDDIR/..
|
||||
|
|
|
@ -24,14 +24,7 @@ if [ "$DI_WWW_HOME" = "default" ];then
|
|||
else
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/armhf/daily"
|
||||
fi
|
||||
if [ -n "$DI_DIR" ];then
|
||||
DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}"
|
||||
DI_WWW_HOME=""
|
||||
echo "Using images from $DI_DIR"
|
||||
fi
|
||||
fi
|
||||
if [ ! "$DI_DIST" ]; then
|
||||
DI_DIST="$DI_CODENAME"
|
||||
try_di_image_cache
|
||||
fi
|
||||
|
||||
cd $CDDIR/..
|
||||
|
|
|
@ -15,13 +15,7 @@ N=$1
|
|||
CDROOT=$2
|
||||
if [ "$DI_WWW_HOME" = "default" ];then
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/hppa/daily/cdrom/2.6"
|
||||
if [ -n "$DI_DIR" ];then
|
||||
DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}"
|
||||
DI_WWW_HOME=""
|
||||
fi
|
||||
fi
|
||||
if [ ! "$DI_DIST" ]; then
|
||||
DI_DIST="$DI_CODENAME"
|
||||
try_di_image_cache
|
||||
fi
|
||||
|
||||
# Only disk 1* bootable
|
||||
|
|
|
@ -17,14 +17,7 @@ CDDIR=$2
|
|||
BOOTDIR=
|
||||
if [ "$DI_WWW_HOME" = "default" ];then
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/hurd-i386/daily/"
|
||||
if [ -n "$DI_DIR" ];then
|
||||
DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}"
|
||||
DI_WWW_HOME=""
|
||||
echo "Using images from $DI_DIR"
|
||||
fi
|
||||
fi
|
||||
if [ ! "$DI_DIST" ]; then
|
||||
DI_DIST="$DI_CODENAME"
|
||||
try_di_image_cache
|
||||
fi
|
||||
|
||||
cd $CDDIR/..
|
||||
|
|
|
@ -13,14 +13,8 @@ N=$1
|
|||
CDDIR=$2
|
||||
BOOTDIR=
|
||||
if [ "$DI_WWW_HOME" = "default" ];then
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/ia64/daily"
|
||||
if [ -n "$DI_DIR" ];then
|
||||
DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}"
|
||||
DI_WWW_HOME=""
|
||||
fi
|
||||
fi
|
||||
if [ ! "$DI_DIST" ]; then
|
||||
DI_DIST="$DI_CODENAME"
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/ia64/daily"
|
||||
try_di_image_cache
|
||||
fi
|
||||
|
||||
cd $CDDIR/..
|
||||
|
|
|
@ -16,19 +16,15 @@ N=$1
|
|||
CDDIR=$2
|
||||
BOOTDIR=
|
||||
if [ "$DI_WWW_HOME" = "default" ];then
|
||||
# Tempting as it might be to merge these two definitions using $ARCH,
|
||||
# do *not* do that - these defs are parsed out by other scripts that
|
||||
# won't cope with that
|
||||
if [ "$ARCH" = kfreebsd-i386 ]; then
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/kfreebsd-i386/daily/"
|
||||
else
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/kfreebsd-amd64/daily/"
|
||||
fi
|
||||
if [ -n "$DI_DIR" ];then
|
||||
DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}"
|
||||
DI_WWW_HOME=""
|
||||
echo "Using images from $DI_DIR"
|
||||
fi
|
||||
fi
|
||||
if [ ! "$DI_DIST" ]; then
|
||||
DI_DIST="$DI_CODENAME"
|
||||
try_di_image_cache
|
||||
fi
|
||||
|
||||
cd $CDDIR/..
|
||||
|
|
|
@ -17,10 +17,7 @@ INSTALLDIR=$CDDIR/install
|
|||
if [ "$DI_WWW_HOME" = "default" ];then
|
||||
# Temporarily disabled to stop cron jobs complaining
|
||||
# DI_WWW_HOME="http://people.debian.org/~smarenka/d-i/m68k/images/daily/"
|
||||
if [ -n "$DI_DIR" ];then
|
||||
DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}"
|
||||
DI_WWW_HOME=""
|
||||
fi
|
||||
try_di_image_cache
|
||||
elif [ "$DI_WWW_HOME" = "test" ];then
|
||||
# Temporarily disabled to stop cron jobs complaining
|
||||
# DI_WWW_HOME="http://people.debian.org/~smarenka/d-i/test/cd/"
|
||||
|
|
|
@ -14,14 +14,8 @@ set -e
|
|||
N=$1
|
||||
CDROOT=$2
|
||||
if [ "$DI_WWW_HOME" = "default" ];then
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/mips/daily/"
|
||||
if [ -n "$DI_DIR" ];then
|
||||
DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}"
|
||||
DI_WWW_HOME=""
|
||||
fi
|
||||
fi
|
||||
if [ ! "$DI_DIST" ]; then
|
||||
DI_DIST="$DI_CODENAME"
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/mips/daily/"
|
||||
try_di_image_cache
|
||||
fi
|
||||
|
||||
add_mkisofs_opt $CDROOT/../$N.mkisofs_opts "-J -joliet-long"
|
||||
|
|
|
@ -16,14 +16,8 @@ set -e
|
|||
N=$1
|
||||
CDROOT=$2
|
||||
if [ "$DI_WWW_HOME" = "default" ];then
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/mipsel/daily"
|
||||
if [ -n "$DI_DIR" ];then
|
||||
DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}"
|
||||
DI_WWW_HOME=""
|
||||
fi
|
||||
fi
|
||||
if [ ! "$DI_DIST" ]; then
|
||||
DI_DIST="$DI_CODENAME"
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/mipsel/daily"
|
||||
try_di_image_cache
|
||||
fi
|
||||
|
||||
# Strip NONUS part of disk number
|
||||
|
|
|
@ -15,14 +15,8 @@ N=$1
|
|||
CDDIR=$2
|
||||
INSTALLDIR=$CDDIR/install
|
||||
if [ "$DI_WWW_HOME" = "default" ];then
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/powerpc/daily"
|
||||
if [ -n "$DI_DIR" ];then
|
||||
DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}"
|
||||
DI_WWW_HOME=""
|
||||
fi
|
||||
fi
|
||||
if [ ! "$DI_DIST" ]; then
|
||||
DI_DIST="$DI_CODENAME"
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/powerpc/daily"
|
||||
try_di_image_cache
|
||||
fi
|
||||
|
||||
cd $CDDIR/..
|
||||
|
|
|
@ -28,7 +28,7 @@ cd $CDDIR/..
|
|||
|
||||
if [ $N != "1" ] && [ $N != "1_NONUS" ] ; then
|
||||
add_mkisofs_opt $CDDIR/../$N.mkisofs_opts "-J -joliet-long"
|
||||
exit 0
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$DI_WWW_HOME" = "default" ];then
|
||||
|
@ -38,13 +38,7 @@ if [ "$DI_WWW_HOME" = "default" ];then
|
|||
if [ "$ARCH" = s390x ]; then
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/s390x/daily"
|
||||
fi
|
||||
if [ -n "$DI_DIR" -a -e "$DI_DIR/~${DI_WWW_HOME#*~}" ] ; then
|
||||
DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}"
|
||||
DI_WWW_HOME=""
|
||||
fi
|
||||
fi
|
||||
if [ ! "$DI_DIST" ]; then
|
||||
DI_DIST="$DI_CODENAME"
|
||||
try_di_image_cache
|
||||
fi
|
||||
|
||||
imagedir="boot$N/boot"
|
||||
|
|
|
@ -11,14 +11,8 @@ set -e
|
|||
N=$1
|
||||
CDDIR=$2
|
||||
if [ "$DI_WWW_HOME" = "default" ];then
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/sparc/daily/cdrom/"
|
||||
if [ -n "$DI_DIR" ];then
|
||||
DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}"
|
||||
DI_WWW_HOME=""
|
||||
fi
|
||||
fi
|
||||
if [ ! "$DI_DIST" ]; then
|
||||
DI_DIST="$DI_CODENAME"
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/sparc/daily/cdrom/"
|
||||
try_di_image_cache
|
||||
fi
|
||||
|
||||
# Only disc 1* bootable
|
||||
|
|
|
@ -19,19 +19,12 @@ if [ "$DI_WWW_HOME" = "default" ];then
|
|||
# Tempting as it might be to merge these two definitions using $ARCH,
|
||||
# do *not* do that - these defs are parsed out by other scripts that
|
||||
# won't cope with that
|
||||
if [ "$ARCH" = i386 ]; then
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/i386/daily"
|
||||
else
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/amd64/daily"
|
||||
fi
|
||||
if [ -n "$DI_DIR" ];then
|
||||
DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}"
|
||||
DI_WWW_HOME=""
|
||||
echo "Using images from $DI_DIR"
|
||||
fi
|
||||
fi
|
||||
if [ ! "$DI_DIST" ]; then
|
||||
DI_DIST="$DI_CODENAME"
|
||||
if [ "$ARCH" = i386 ]; then
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/i386/daily"
|
||||
else
|
||||
DI_WWW_HOME="http://d-i.debian.org/daily-images/amd64/daily"
|
||||
fi
|
||||
try_di_image_cache
|
||||
fi
|
||||
|
||||
case "$MKISOFS" in
|
||||
|
|
|
@ -10,6 +10,11 @@ export PATH
|
|||
DI_WWW_HOME="$(echo "$DI_WWW_HOME" | sed -e "s|%ARCH%|$ARCH|g")"
|
||||
DI_DIR="$(echo "$DI_DIR" | sed -e "s|%ARCH%|$ARCH|g")"
|
||||
|
||||
# Make sure that DI_DIST is set to something sane
|
||||
if [ ! "$DI_DIST" ]; then
|
||||
DI_DIST="$DI_CODENAME"
|
||||
fi
|
||||
|
||||
# Find out what the default desktop is in tasksel if we've not set it
|
||||
# (i.e. using "all" for netinst, DVD etc.) - print the name of the
|
||||
# first desktop task recommended by task-desktop
|
||||
|
@ -92,3 +97,13 @@ calc_boot_size() {
|
|||
size=$[($(stat -c%s "$FILE")+2047)/2048]
|
||||
echo $size
|
||||
}
|
||||
|
||||
# If we're looking for an image location to download, see if it's in a
|
||||
# local cache first.
|
||||
try_di_image_cache() {
|
||||
if [ -n "$DI_DIR" -a -e "$DI_DIR/~${DI_WWW_HOME#*~}" ] ; then
|
||||
DI_DIR="$DI_DIR/${DI_WWW_HOME#*http://}"
|
||||
DI_WWW_HOME=""
|
||||
echo "Using images from local cache: $DI_DIR"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue