diff options
author | Florent Villard <warly@mandriva.com> | 2005-12-29 16:03:38 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2005-12-29 16:03:38 +0000 |
commit | 96396d2b9c1626cbb1bb4afc74a2517e51832802 (patch) | |
tree | f844f9be1c187416b7dafe9638f4d4c911a48e17 /iurt2 | |
parent | 9608e0bc577dac4a0bdf216880153d7a744a292e (diff) | |
download | iurt-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-x | iurt2 | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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"; |