summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-01-24 13:11:59 +0000
committerFrancois Pons <fpons@mandriva.com>2000-01-24 13:11:59 +0000
commita017398045923dc46bc1074add8c173da30524a3 (patch)
treeb7e9619ad8a625860e45015be1174fe9ecb4a26b
parentfe0e92f4e338bd3ab690e409ff9ccde6cfe58780 (diff)
downloaddrakx-backup-do-not-use-a017398045923dc46bc1074add8c173da30524a3.tar
drakx-backup-do-not-use-a017398045923dc46bc1074add8c173da30524a3.tar.gz
drakx-backup-do-not-use-a017398045923dc46bc1074add8c173da30524a3.tar.bz2
drakx-backup-do-not-use-a017398045923dc46bc1074add8c173da30524a3.tar.xz
drakx-backup-do-not-use-a017398045923dc46bc1074add8c173da30524a3.zip
*** empty log message ***
-rwxr-xr-xtools/specific_arch27
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/specific_arch b/tools/specific_arch
new file mode 100755
index 000000000..1718e8f09
--- /dev/null
+++ b/tools/specific_arch
@@ -0,0 +1,27 @@
+#!/usr/bin/perl
+
+%compat_arch = (
+ 'noarch' => '',
+ 'i386' => 'noarch',
+ 'i486' => 'i386',
+ 'i586' => 'i486',
+ 'i686' => 'i586',
+ 'i786' => 'i686',
+ 'k6' => 'i586',
+ 'k7' => 'k6',
+ 'k8' => 'k7',
+ 'alpha' => 'noarch',
+ 'sparc' => 'noarch',
+ 'sparc32' => 'sparc',
+ 'sparc64' => 'sparc32',
+ );
+
+$arch = `uname -m` || 'unknownarch';
+$arch =~ s/\s//g;
+
+print join ' ', map {
+ my $arch = $arch;
+ $arch = $compat_arch{$arch} while $arch && !-e "$_.$arch";
+ -e "$_.$arch" ? "$_.$arch" : $_;
+ } @ARGV;
+print "\n";