makeidb.perl 674 Bytes
#! /usr/bin/perl
#----------------------------------------------------------------------#
#	Copyright (C) 1997, Nintendo.
#	
#	File		makeidb.perl
#	Coded    by	Yoshitaka Yasumoto.	Oct  8, 1997.
#	Modified by	
#	
#	$Id: makeidb.perl,v 1.1.1.1 2002/05/02 03:29:11 blythe Exp $
#----------------------------------------------------------------------#

open(FILE, "$ARGV[0]") || die "Cannot open $ARGV[0]\n";

while (<FILE>){
    if (($id, $mode, $cart, $file, $flag) =
	/^\s*p*ip*\s*([tdb])\s*(\d*)\s*(\S*)\s*(\S*)\s*(\S*)$/){
	$id =~ s/[tb]/f/;
	printf("$id $mode root sys $file $file patch$ARGV[1].ultra_dev.$cart $flag\n"); 
    }
}

#======== End of makeidb.perl ========#