diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2007-06-25 14:11:22 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2007-06-25 14:11:22 +0000 |
commit | 349fca594a40b1b45b95d60f7c7c95dfcae81b22 (patch) | |
tree | b26a362c8cfda12a8b95b9787798ee072c72bce6 /rpmgenplatform.in | |
parent | 75b3b40bd369e0fedc72bcf22450675f22105b82 (diff) | |
download | rpm-setup-349fca594a40b1b45b95d60f7c7c95dfcae81b22.tar rpm-setup-349fca594a40b1b45b95d60f7c7c95dfcae81b22.tar.gz rpm-setup-349fca594a40b1b45b95d60f7c7c95dfcae81b22.tar.bz2 rpm-setup-349fca594a40b1b45b95d60f7c7c95dfcae81b22.tar.xz rpm-setup-349fca594a40b1b45b95d60f7c7c95dfcae81b22.zip |
- rename genplatform to rpmgenplatform
Diffstat (limited to 'rpmgenplatform.in')
-rw-r--r-- | rpmgenplatform.in | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/rpmgenplatform.in b/rpmgenplatform.in new file mode 100644 index 0000000..fc6bf82 --- /dev/null +++ b/rpmgenplatform.in @@ -0,0 +1,27 @@ +#!/usr/sbin/perl + +# $Id$ +use strict; +use warnings; + +my @ALLARCH=qw{ + noarch + @RPMALLARCH@ +}; + +my $anysuffix = '-.*-@RPMOS@-gnu'; +my $suffix = '-@RPMCANONVENDOR@-@RPMOS@-gnu'; +my $canonarch = $ARGV[0] || `uname -m`; +chomp($canonarch); + +foreach my $suf ($suffix, $anysuffix) { + my $found = 0; + my %done = (); + foreach my $arch (reverse @ALLARCH) { + $arch eq $canonarch and $found = 1; + $found or next; + $done{$arch} and next; + $done{$arch} = 1; + print "$arch$suf\n"; + } +} |