scmtomap: extract map data from scm
authorShiar <shiar@shiar.org>
Wed, 28 Nov 2007 03:54:21 +0000 (04:54 +0100)
committerShiar <shiar@shiar.org>
Sat, 19 Jan 2008 05:14:07 +0000 (06:14 +0100)
Perl Archive::MoPaQ map extractor prototype. Assumes the data to be the
first file part, which certainly isn't always correct (detection later).
Can only extract to an external file rightnow.

scmtomap [new file with mode: 0755]

diff --git a/scmtomap b/scmtomap
new file mode 100755 (executable)
index 0000000..1c24020
--- /dev/null
+++ b/scmtomap
@@ -0,0 +1,14 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+
+use Archive::MoPaQ;
+
+@ARGV or die "Usage: $0 filename.scm\n";
+
+my $mpq = Archive::MoPaQ->new or die;
+print $mpq->open($ARGV[0]);
+$mpq->listopen("");
+$mpq->extract(1);
+