summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-04 13:14:11 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-04-04 13:14:11 +0000
commit3cc1801d828dd2d3e5fb1b12e20c1b0566e85e4c (patch)
tree6d89341ccf84fd809d62a8a1b2d8c26a4005f27a /perl-install/install_any.pm
parentc0ba252c1d8beba03389c857d799b4a53b1dac14 (diff)
downloaddrakx-backup-do-not-use-3cc1801d828dd2d3e5fb1b12e20c1b0566e85e4c.tar
drakx-backup-do-not-use-3cc1801d828dd2d3e5fb1b12e20c1b0566e85e4c.tar.gz
drakx-backup-do-not-use-3cc1801d828dd2d3e5fb1b12e20c1b0566e85e4c.tar.bz2
drakx-backup-do-not-use-3cc1801d828dd2d3e5fb1b12e20c1b0566e85e4c.tar.xz
drakx-backup-do-not-use-3cc1801d828dd2d3e5fb1b12e20c1b0566e85e4c.zip
Introduce the new utility function getCDNumber()
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index bf35ae788..cab260b0c 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -85,6 +85,16 @@ sub askChangeMedium($$) {
$allow;
}
+#- guess the CD number from a media description
+sub getCDNumber {
+ my ($description) = @_;
+ (my $cd) = $description =~ /\b(?:CD|DVD) ?(\d+)\b/i;
+ if (!$cd) { #- test for mini-ISO
+ $cd = 1 if $description =~ /\bmini.?cd\b/i;
+ }
+ $cd;
+}
+
sub method_is_from_ISO_images($) {
my ($method) = @_;
$method eq "disk-iso" || $method eq "nfs-iso";