Factor out the xorriso version-checking code

This commit is contained in:
Steve McIntyre 2014-04-08 18:32:13 +01:00
parent ec29afa4cf
commit 6b0e67d201
7 changed files with 28 additions and 26 deletions

7
debian/changelog vendored
View File

@ -3,8 +3,6 @@ debian-cd (3.1.15) UNRELEASED; urgency=low
[ Steve McIntyre ]
* Add "UEFI" text to the UEFI installer menu title to make it easier for
end users to distinguish between UEFI and BIOS boot.
* tools/apt-selection: pass APT::Architectures:: when calling apt;
otherwise if we're running on a multi-arch system apt will break
[ Samuel Thibault ]
* Make kfreebsd & hurd images usbkey-bootable. Closes: #739422
@ -12,6 +10,11 @@ debian-cd (3.1.15) UNRELEASED; urgency=low
[ Raphaël Hertzog ]
* Fix code extracting the xorriso version.
[ Steve McIntyre ]
* tools/apt-selection: pass APT::Architectures:: when calling apt;
otherwise if we're running on a multi-arch system apt will break
* Factor out the xorriso version-checking code
-- Steve McIntyre <93sam@debian.org> Tue, 11 Feb 2014 01:57:01 +0000
debian-cd (3.1.14) unstable; urgency=medium

View File

@ -22,12 +22,7 @@ fi
case "$MKISOFS" in
*xorriso*)
XORRISO_VER=$($MKISOFS --version 2>&1 | awk '
/^xorriso version/ {
split($4, ver, ".")
print ver[1]*10000+ver[2]*100+ver[3]
}')
# OK
XORRISO_VER=$(xorriso_version)
;;
*)
echo "ERROR: debian-cd now depends on xorriso for making x86 bootable CDs."

View File

@ -29,12 +29,7 @@ fi
case "$MKISOFS" in
*xorriso*)
XORRISO_VER=$($MKISOFS --version 2>&1 | awk '
/^xorriso version/ {
split($4, ver, ".")
print ver[1]*10000+ver[2]*100+ver[3]
}')
# OK
XORRISO_VER=$(xorriso_version)
;;
*)
echo "ERROR: debian-cd now depends on xorriso for making x86 bootable CDs."

View File

@ -29,12 +29,7 @@ fi
case "$MKISOFS" in
*xorriso*)
XORRISO_VER=$($MKISOFS --version 2>&1 | awk '
/^xorriso version/ {
split($4, ver, ".")
print ver[1]*10000+ver[2]*100+ver[3]
}')
# OK
XORRISO_VER=$(xorriso_version)
;;
*)
echo "ERROR: debian-cd now depends on xorriso for making x86 bootable CDs."

View File

@ -119,3 +119,12 @@ try_di_image_cache() {
esac
fi
}
# Grab the xorriso version and turn it into a number we can use
xorriso_version() {
$MKISOFS --version 2>&1 | awk '
`/^xorriso version/ {
split($4, ver, ".")
print ver[1]*10000+ver[2]*100+ver[3]
}'
}

View File

@ -37,12 +37,7 @@ fi
case "$MKISOFS" in
*xorriso*)
XORRISO_VER=$($MKISOFS --version 2>&1 | awk '
/^xorriso version/ {
split($4, ver, ".")
print ver[1]*10000+ver[2]*100+ver[3]
}')
# OK
XORRISO_VER=$(xorriso_version)
;;
*)
echo "ERROR: debian-cd now depends on xorriso for making x86 bootable CDs."

View File

@ -92,3 +92,13 @@ calc_boot_size() {
size=$[($(stat -c%s "$FILE")+2047)/2048]
echo $size
}
# Grab the xorriso version and turn it into a number we can use
xorriso_version() {
$MKISOFS --version 2>&1 | awk '
`/^xorriso version/ {
split($4, ver, ".")
print ver[1]*10000+ver[2]*100+ver[3]
}'
}