rockbox/tools/romsizetest.pl
Daniel Stenberg 678090a2e7 rombox support: building and zip
general makefile: less output


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5043 a1c6a512-1295-4272-9138-f99709370657
2004-09-06 07:05:12 +00:00

22 lines
522 B
Perl
Executable file

#!/usr/bin/perl
#
# Check that the given file is smaller than the given size and if not, return
# an error code. Used to verify that the rombox.ucl file fits on the particular
# model you build for.
sub filesize {
my ($filename)=@_;
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks)
= stat($filename);
return $size;
}
my $max = $ARGV[0];
my $file = filesize($ARGV[1]);
if($file > $max ) {
print "Output is larger than max ($max)\n";
exit 1;
}