From 048d1a94e990557da4a6fb8b7d7e2351a4d7203d Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 4 Dec 2003 09:46:53 +0000 Subject: inspect /export/Mandrake/RPMS to get the kernel version --- move/make_live | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/move/make_live b/move/make_live index 579b3de67..27f675266 100755 --- a/move/make_live +++ b/move/make_live @@ -9,7 +9,12 @@ my @langs = map { /^../; $& } @ALLOWED_LANGS; @ARGV <= 1 or die "usage: make_live [live_location=/tmp/live_tree]\n"; -my $kernel_version = '2.4.22.21.1mdk'; +my $kernel_version = do { + my @l = glob_('/export/Mandrake/RPMS/kernel-2.*'); + @l >= 1 or die "can't find kernel"; + @l <= 1 or die "too many kernels"; + first(`rpm -qp --qf '%{name}' $l[0]` =~ /kernel-(.*)/); +}; sub installPackages { output_p("$::prefix/etc/rpm/macros", "%_install_langs " . join(":", @langs) . "\n"); -- cgit v1.2.1