summaryrefslogtreecommitdiffstats
path: root/tools/oem-prepare
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-04-25 16:49:44 +0000
committerFrancois Pons <fpons@mandriva.com>2001-04-25 16:49:44 +0000
commit231e05ca33f33d3f8dfa1c0739a4c80ffc675138 (patch)
treeccfa6f0701eed6ec55022d701c6d1b7296c5c49a /tools/oem-prepare
parentfe7705317b1f3048f0e03a04ced25558df95f14e (diff)
downloaddrakx-231e05ca33f33d3f8dfa1c0739a4c80ffc675138.tar
drakx-231e05ca33f33d3f8dfa1c0739a4c80ffc675138.tar.gz
drakx-231e05ca33f33d3f8dfa1c0739a4c80ffc675138.tar.bz2
drakx-231e05ca33f33d3f8dfa1c0739a4c80ffc675138.tar.xz
drakx-231e05ca33f33d3f8dfa1c0739a4c80ffc675138.zip
fixed use of VERSION file to find language.
Diffstat (limited to 'tools/oem-prepare')
-rwxr-xr-xtools/oem-prepare14
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) {