| 1 |
#!/bin/env perl -w |
| 2 |
# |
| 3 |
# $Id: map2proto 830 2006-09-19 18:23:08Z comand $ |
| 4 |
# |
| 5 |
# Copyright 2006 Cory Omand <comand@blastwave.org> |
| 6 |
# All rights reserved. Use is subject to license terms. |
| 7 |
# |
| 8 |
# Redistribution and/or use, with or without modification, is |
| 9 |
# permitted. This software is without warranty of any kind. The |
| 10 |
# author(s) shall not be liable in the event that use of the |
| 11 |
# software causes damage. |
| 12 |
# |
| 13 |
# map2proto - reformat a pkgmap as a prototype |
| 14 |
# |
| 15 |
|
| 16 |
use strict; |
| 17 |
|
| 18 |
while (<>) { |
| 19 |
chomp ; my @F = split; |
| 20 |
next unless @F > 3; |
| 21 |
print join(" ", ($F[1] =~ /f|d|i/) ? @F[1..$#F-3] : @F[1..$#F]); |
| 22 |
} |