[36754] users/ryandesign/minivmac/files
ryandesign at macports.org
ryandesign at macports.org
Wed May 14 00:43:00 PDT 2008
Revision: 36754
http://trac.macosforge.org/projects/macports/changeset/36754
Author: ryandesign at macports.org
Date: 2008-05-14 00:42:59 -0700 (Wed, 14 May 2008)
Log Message:
-----------
minivmac: add extra script files that go with r36753
Added Paths:
-----------
users/ryandesign/minivmac/files/attach.exp
users/ryandesign/minivmac/files/demacbinary.sh
Added: users/ryandesign/minivmac/files/attach.exp
===================================================================
--- users/ryandesign/minivmac/files/attach.exp (rev 0)
+++ users/ryandesign/minivmac/files/attach.exp 2008-05-14 07:42:59 UTC (rev 36754)
@@ -0,0 +1,23 @@
+#!/usr/bin/env expect --
+
+if {[lindex $argv 2]} {
+ set flag "-readwrite"
+} else {
+ set flag "-readonly"
+}
+
+spawn hdiutil attach "[lindex $argv 0]" -mountpoint "[lindex $argv 1]" -private -nobrowse $flag
+
+expect {
+ "Software License" {
+ exp_send "q"
+ exp_continue
+ }
+ "Agree Y/N?" {
+ exp_send "y\r"
+ exp_continue
+ }
+ "/dev/" {
+ interact
+ }
+}
Property changes on: users/ryandesign/minivmac/files/attach.exp
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:eol-style
+ LF
Added: users/ryandesign/minivmac/files/demacbinary.sh
===================================================================
--- users/ryandesign/minivmac/files/demacbinary.sh (rev 0)
+++ users/ryandesign/minivmac/files/demacbinary.sh 2008-05-14 07:42:59 UTC (rev 36754)
@@ -0,0 +1,36 @@
+#!/bin/sh
+
+INFILE="$1"
+OUT="$2"
+
+if [ $# -ne 2 ]; then
+ echo "usage: $0 <infile> <outfile or outdir>" 1>&2
+ exit 1
+fi
+
+if [ ! -f "$INFILE" ]; then
+ echo "$0: $INFILE: No such file" 1>&2
+ exit 1
+fi
+
+if [ -d "$OUT" ]; then
+ OUTDIR="$OUT"
+ OUTFILE="$OUTDIR/`basename "$INFILE" .bin`"
+else
+ OUTFILE="$OUT"
+ OUTDIR="`dirname "$OUTFILE"`"
+fi
+
+if [ ! -d "$OUTDIR" ]; then
+ echo "$0: $OUTDIR: No such directory" 1>&2
+ exit 1
+fi
+
+DATAFORKFILE="$OUTFILE.data"
+RSRCFORKFILE="$OUTFILE.rsrc"
+INFOFILE="$OUTFILE.info"
+
+(cd "$OUTDIR" && macunpack -3 "$INFILE" || exit $?)
+cp "$DATAFORKFILE" "$OUTFILE" || exit $?
+cp "$RSRCFORKFILE" "$OUTFILE/rsrc" || exit $?
+rm -f "$DATAFORKFILE" "$RSRCFORKFILE" "$INFOFILE"
Property changes on: users/ryandesign/minivmac/files/demacbinary.sh
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:eol-style
+ LF
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080514/85224944/attachment-0001.html
More information about the macports-changes
mailing list