[Scummvm-git-logs] scummvm master -> 8fe86a7cf4fa95452c1361689fe5aa7fd981cba0

sev- sev at scummvm.org
Thu Jul 29 14:23:41 UTC 2021


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4a76542e93 DEVTOOLS: Implement -S and -o options for the dumper companion
8fe86a7cf4 DEVTOOLS: Flip the execution bit for the dumper-companion.pl


Commit: 4a76542e9388f8b7af6d6b0a38c6d59d68ded95d
    https://github.com/scummvm/scummvm/commit/4a76542e9388f8b7af6d6b0a38c6d59d68ded95d
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-29T16:23:27+02:00

Commit Message:
DEVTOOLS: Implement -S and -o options for the dumper companion

Changed paths:
    devtools/dumper-companion.pl


diff --git a/devtools/dumper-companion.pl b/devtools/dumper-companion.pl
index ed72235bcc..8f71a5fb1c 100644
--- a/devtools/dumper-companion.pl
+++ b/devtools/dumper-companion.pl
@@ -28,6 +28,7 @@ use constant UNICODE_MAX => 0x10FFFF;
 my $Delimiter = chr 0x2D;
 my $BasicRE   = "\x00-\x7f";
 my $PunyRE    = "A-Za-z0-9";
+my $outPath = "./";
 
 sub VERSION_MESSAGE() {
 	print "$0 version 1.0\n"
@@ -40,7 +41,7 @@ sub decode_punycode;
 sub encode_punycode;
 sub encode_punycodefilename;
 
-getopts('hmf:c:eds');
+getopts('hmf:c:edsS:o:');
 
 if ($::opt_c and $::opt_e) {
 	die "$0: -c and -e are mutually exclusive";
@@ -59,6 +60,15 @@ if ($::opt_s) {
 	exit 0;
 }
 
+if ($::opt_S) {
+	print encode_punycodefilename($::opt_S) . "\n";
+	exit 0;
+}
+
+if ($::opt_o) {
+	$outPath = $::opt_o;
+}
+
 if ($::opt_m) {
 	processMacbinary;
 	exit 0;
@@ -107,7 +117,7 @@ sub processIso($) {
 			# Replace Mac separators with *nix
 			$dir =~ s/:/\//g;
 
-			mkdir "$dir";
+			mkdir "$outPath$dir";
 			$numdirs++;
 		} elsif (/^[fF]/) {
 			if (/[fF]i?\s+[^\s]+\s+([0-9]+)\s+([0-9]+)\s+\w+\s+\d+\s+\d+\s+(.*)/) {
@@ -131,9 +141,9 @@ sub processIso($) {
 				flush STDOUT;
 
 				if ($res != 0) {
-					system("hcopy -m -- \"$mdir$fname\" \"$dir$decfname\"");
+					system("hcopy -m -- \"$mdir$fname\" \"$outPath$dir$decfname\"");
 				} else {
-					system("hcopy -r -- \"$mdir$fname\" \"$dir$decfname\"");
+					system("hcopy -r -- \"$mdir$fname\" \"$outPath$dir$decfname\"");
 				}
 				$numfiles++;
 			} else {
@@ -183,14 +193,17 @@ Mode 1:
 	  -d decode filenames from punycode
 
 Mode 2:
-  $0 [-c <encoding>] [-e] -f <file.iso>
+  $0 [-c <encoding>] [-e] [-o directory] -f <file.iso>
 	  Operate in disk dumping mode
 	  Optionally specify encoding (MacRoman, MacJapanese)
 	  If -e is specified, then encode filenames into punycode
+	  If -o is specified, outputs the file to the specified directory
 
 Mode 3:
   $0 -s
      Read whole standard input and encode it with punycode
+  $0 -S <string>
+     Encodes specified string with punycode
 
 Miscellaneous:
   -h, --help   display this help and exit


Commit: 8fe86a7cf4fa95452c1361689fe5aa7fd981cba0
    https://github.com/scummvm/scummvm/commit/8fe86a7cf4fa95452c1361689fe5aa7fd981cba0
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2021-07-29T16:23:27+02:00

Commit Message:
DEVTOOLS: Flip the execution bit for the dumper-companion.pl

Changed paths:
    devtools/dumper-companion.pl


diff --git a/devtools/dumper-companion.pl b/devtools/dumper-companion.pl
old mode 100644
new mode 100755




More information about the Scummvm-git-logs mailing list