diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/oem-prepare | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tools/oem-prepare b/tools/oem-prepare index 2af40af07..c19fd7127 100755 --- a/tools/oem-prepare +++ b/tools/oem-prepare @@ -4,9 +4,15 @@ my ($mode, $dir, $reject_dir, $lang, $flang) = @ARGV; $mode =~ s/^--(rebuild|clean)$/$1/ or die "mode should be --rebuild or --clean\n"; -e "$dir/Mandrake/base/hdlists" && -d $reject_dir or die "usage: oem-prepare <--rebuild|--clean> <top_dir> <reject_dir> <lang>\n"; +#- default language fall to what is contained in VERSION file. +open F, "$dir/VERSION"; +foreach (<F>) { + /[\s-]fr/ and $lang = "fr"; +} +close F; +$lang ||= "en"; $lang eq "fr" and $flang = "fr_FR"; -#- default language fall to english ? -$lang or ($lang, $flang) = ("en", "en_US"); +$lang eq "en" and $flang = "en_US"; print "Found lang $lang (flang is $flang)\n"; my $packages = select_packages($dir, $lang); @@ -98,7 +104,7 @@ sub select_packages { #- DO NOT FORGET TO UPDATE HERE ACCORDING TO gi/perl-install/install_any.pm my @pkgs = qw(XFree86 XFree86-glide-module Device3Dfx Glide_V3-DRI Glide_V5 Mesa dhcpcd pump dhcpxd dhcp-client isdn4net isdn4k-utils dev pptp-adsl-fr rp-pppoe ppp ypbind - rhs-printfilters lpr cups cups-drivers samba ncpfs ghostscript-utils + rhs-printfilters lpr cups cups-drivers samba ncpfs ghostscript-utils autologin kernel-pcmcia-cs apmd cdrecord rio500 ); push @pkgs, "XFree86-$_" foreach qw(3DLabs 3dfx 8514 AGX FBDev I128 Mach8 Mach32 Mach64 Mono P9000 Rage128 S3 S3V SVGA VGA16 W32); @@ -126,8 +132,6 @@ sub select_packages { $o->{compssUsersChoice}{$_} = 1 foreach map { @{$o->{compssUsers}{$_}} } @{$o->{compssUsersSorted}}; $o->{compssUsersChoice}{SYSTEM} = 1; -#- prepare a oem disk for both oem and oem-server (so keep oem-server list of packages). -# @{$o->{compssUsersChoice}}{grep { /SERVER/ } keys %{$o->{compssUsersChoice}}} = (); my $lang_pkg = $lang && pkgs::packageByName($o->{packages}, "locales-$lang"); if ($lang_pkg) { |