mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 10:17:14 +00:00
DEVTOOLS: Implement macbinary encoding for dumper-companion
This commit is contained in:
parent
780d10756c
commit
ec344292f0
@ -3,6 +3,7 @@
|
||||
use strict;
|
||||
use Getopt::Std;
|
||||
use Encode;
|
||||
use File::Find;
|
||||
|
||||
sub VERSION_MESSAGE() {
|
||||
print "$0 version 1.0\n"
|
||||
@ -10,6 +11,7 @@ sub VERSION_MESSAGE() {
|
||||
|
||||
sub HELP_MESSAGE();
|
||||
sub processIso($);
|
||||
sub processMacbinary();
|
||||
|
||||
getopts('hmf:e:');
|
||||
|
||||
@ -18,6 +20,11 @@ if ($::opt_h) {
|
||||
exit 0;
|
||||
}
|
||||
|
||||
if ($::opt_m) {
|
||||
processMacbinary;
|
||||
exit 0;
|
||||
}
|
||||
|
||||
if ($::opt_f) {
|
||||
processIso($::opt_f);
|
||||
}
|
||||
@ -96,6 +103,22 @@ sub processIso($) {
|
||||
print "done\n";
|
||||
}
|
||||
|
||||
sub processMacbinary() {
|
||||
find( sub {
|
||||
my $fname = $_;
|
||||
|
||||
if (open F, "$fname/..namedfork/rsrc") {
|
||||
print "Resource in $fname\n";
|
||||
close F;
|
||||
|
||||
system("macbinary encode \"$fname\"");
|
||||
system("touch -r \"$fname\" \"$fname.bin\"");
|
||||
system("mv \"$fname.bin\" \"$fname\"");
|
||||
}
|
||||
}, ".");
|
||||
|
||||
}
|
||||
|
||||
sub HELP_MESSAGE() {
|
||||
print <<EOF;
|
||||
Usage: $0 [OPTIONS]...
|
||||
|
Loading…
x
Reference in New Issue
Block a user