aboutsummaryrefslogtreecommitdiffstats
path: root/iurt2
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2005-12-29 16:03:38 +0000
committerFlorent Villard <warly@mandriva.com>2005-12-29 16:03:38 +0000
commit96396d2b9c1626cbb1bb4afc74a2517e51832802 (patch)
treef844f9be1c187416b7dafe9638f4d4c911a48e17 /iurt2
parent9608e0bc577dac4a0bdf216880153d7a744a292e (diff)
downloadiurt-96396d2b9c1626cbb1bb4afc74a2517e51832802.tar
iurt-96396d2b9c1626cbb1bb4afc74a2517e51832802.tar.gz
iurt-96396d2b9c1626cbb1bb4afc74a2517e51832802.tar.bz2
iurt-96396d2b9c1626cbb1bb4afc74a2517e51832802.tar.xz
iurt-96396d2b9c1626cbb1bb4afc74a2517e51832802.zip
Perform a basic check of the architecture before running
Diffstat (limited to 'iurt2')
-rwxr-xr-xiurt212
1 files changed, 12 insertions, 0 deletions
diff --git a/iurt2 b/iurt2
index 673f1c1..399a317 100755
--- a/iurt2
+++ b/iurt2
@@ -43,6 +43,18 @@ my $media = shift @argv;
my @special_srpm_dir = @argv;
$my_arch or usage();
+my $real_arch = `uname -m`;
+chomp $real_arch;
+my %arch_comp = (
+ 'i586' => { 'i386' => 1, 'i486' => 1, 'i586' => 1 },
+ 'i686' => { 'i386' => 1, 'i486' => 1, 'i586' => 1, 'i686' => 1 },
+ 'x86_64' => { 'i386' => 1, 'i486' => 1, 'i586' => 1, 'i686' => 1, 'x86_64' => 1 },
+ 'ppc' => { 'ppc' => 1 },
+ 'ppc64' => { 'ppc' => 1, 'ppc64' => 1 },
+);
+if (!$arch_comp{$real_arch}{$my_arch}) {
+ die "FATAL iurt: could not compile $my_arch binaries on a $real_arch"
+}
my $HOME = $ENV{HOME};
my $configfile = "$HOME/.iurt.$distro_tag.conf";