[106318] trunk/dports/emulators

ryandesign at macports.org ryandesign at macports.org
Wed May 22 05:28:15 PDT 2013


Revision: 106318
          https://trac.macports.org/changeset/106318
Author:   ryandesign at macports.org
Date:     2013-05-22 05:28:15 -0700 (Wed, 22 May 2013)
Log Message:
-----------
minivmac, minivmac-devel: make demacbinary.sh write into the current working directory

Modified Paths:
--------------
    trunk/dports/emulators/minivmac/Portfile
    trunk/dports/emulators/minivmac/files/demacbinary.sh
    trunk/dports/emulators/minivmac-devel/Portfile
    trunk/dports/emulators/minivmac-devel/files/demacbinary.sh

Modified: trunk/dports/emulators/minivmac/Portfile
===================================================================
--- trunk/dports/emulators/minivmac/Portfile	2013-05-22 12:20:21 UTC (rev 106317)
+++ trunk/dports/emulators/minivmac/Portfile	2013-05-22 12:28:15 UTC (rev 106318)
@@ -143,7 +143,7 @@
 post-extract {
     # Decode MacBinary encoding of the system disk container image.
     ui_debug "Decoding ${my_system_disk_container_distfile}."
-    my_system "sh ${filespath}/demacbinary.sh ${distpath}/${my_system_disk_container_distfile} ${worksrcpath}"
+    system -W ${worksrcpath} "sh ${filespath}/demacbinary.sh ${distpath}/${my_system_disk_container_distfile}"
     
     # Decompress the system disk container image.
     ui_debug "Decompressing ${my_system_disk_container}."
@@ -388,11 +388,6 @@
     }
 }
 
-proc my_system {cmd} {
-     ui_debug ${cmd}
-     system ${cmd}
-}
-
 livecheck.type          regex
 livecheck.url           ${homepage}doc/download.html
 livecheck.regex         ${my_name}-(\[0-9.\]+)\\.src

Modified: trunk/dports/emulators/minivmac/files/demacbinary.sh
===================================================================
--- trunk/dports/emulators/minivmac/files/demacbinary.sh	2013-05-22 12:20:21 UTC (rev 106317)
+++ trunk/dports/emulators/minivmac/files/demacbinary.sh	2013-05-22 12:28:15 UTC (rev 106318)
@@ -3,10 +3,9 @@
 # $Id$
 
 INFILE="$1"
-OUT="$2"
 
-if [ $# -ne 2 ]; then
-	echo "usage: $0 <infile> <outfile or outdir>" 1>&2
+if [ $# -ne 1 ]; then
+	echo "usage: $0 <infile>" 1>&2
 	exit 1
 fi
 
@@ -15,22 +14,16 @@
 	exit 1
 fi
 
-if [ -d "$OUT" ]; then
-	OUTDIR="$OUT"
-	OUTFILE="$OUTDIR/`basename "$INFILE" .bin`"
-else
-	OUTFILE="$OUT"
-	OUTDIR="`dirname "$OUTFILE"`"
-fi
+OUTFILE="$(basename "$INFILE" .bin)"
 
-if [ ! -d "$OUTDIR" ]; then
-	echo "$0: $OUTDIR: No such directory" 1>&2
+if [ "$INFILE" == "$OUTFILE" ]; then
+	echo "$0: $INFILE: Filename doesn't end with .bin" 1>&2
 	exit 1
 fi
 
 MACBINARY="/usr/bin/macbinary"
 if [ -x "$MACBINARY" ]; then
-	"$MACBINARY" decode -C "$OUTDIR" -o "$OUTFILE" "$INFILE"
+	"$MACBINARY" decode -o "$OUTFILE" "$INFILE"
 	exit $?
 fi
 
@@ -38,7 +31,7 @@
 RSRCFORKFILE="$OUTFILE.rsrc"
 INFOFILE="$OUTFILE.info"
 
-(cd "$OUTDIR" && macunpack -3 "$INFILE" || exit $?)
+macunpack -3 "$INFILE" || exit $?
 cp "$DATAFORKFILE" "$OUTFILE" || exit $?
 cp "$RSRCFORKFILE" "$OUTFILE/rsrc" || exit $?
 rm -f "$DATAFORKFILE" "$RSRCFORKFILE" "$INFOFILE"

Modified: trunk/dports/emulators/minivmac-devel/Portfile
===================================================================
--- trunk/dports/emulators/minivmac-devel/Portfile	2013-05-22 12:20:21 UTC (rev 106317)
+++ trunk/dports/emulators/minivmac-devel/Portfile	2013-05-22 12:28:15 UTC (rev 106318)
@@ -152,7 +152,7 @@
 post-extract {
     # Decode MacBinary encoding of the system disk container image.
     ui_debug "Decoding ${my_system_disk_container_distfile}."
-    my_system "sh ${filespath}/demacbinary.sh ${distpath}/${my_system_disk_container_distfile} ${worksrcpath}"
+    system -W ${worksrcpath} "sh ${filespath}/demacbinary.sh ${distpath}/${my_system_disk_container_distfile}"
     
     # Decompress the system disk container image.
     ui_debug "Decompressing ${my_system_disk_container}."
@@ -397,11 +397,6 @@
     }
 }
 
-proc my_system {cmd} {
-     ui_debug ${cmd}
-     system ${cmd}
-}
-
 livecheck.type          regex
 livecheck.version       ${my_version}
 livecheck.regex         ${my_name}-?(\[0-9.\]+)\\.src

Modified: trunk/dports/emulators/minivmac-devel/files/demacbinary.sh
===================================================================
--- trunk/dports/emulators/minivmac-devel/files/demacbinary.sh	2013-05-22 12:20:21 UTC (rev 106317)
+++ trunk/dports/emulators/minivmac-devel/files/demacbinary.sh	2013-05-22 12:28:15 UTC (rev 106318)
@@ -3,10 +3,9 @@
 # $Id$
 
 INFILE="$1"
-OUT="$2"
 
-if [ $# -ne 2 ]; then
-	echo "usage: $0 <infile> <outfile or outdir>" 1>&2
+if [ $# -ne 1 ]; then
+	echo "usage: $0 <infile>" 1>&2
 	exit 1
 fi
 
@@ -15,22 +14,16 @@
 	exit 1
 fi
 
-if [ -d "$OUT" ]; then
-	OUTDIR="$OUT"
-	OUTFILE="$OUTDIR/`basename "$INFILE" .bin`"
-else
-	OUTFILE="$OUT"
-	OUTDIR="`dirname "$OUTFILE"`"
-fi
+OUTFILE="$(basename "$INFILE" .bin)"
 
-if [ ! -d "$OUTDIR" ]; then
-	echo "$0: $OUTDIR: No such directory" 1>&2
+if [ "$INFILE" == "$OUTFILE" ]; then
+	echo "$0: $INFILE: Filename doesn't end with .bin" 1>&2
 	exit 1
 fi
 
 MACBINARY="/usr/bin/macbinary"
 if [ -x "$MACBINARY" ]; then
-	"$MACBINARY" decode -C "$OUTDIR" -o "$OUTFILE" "$INFILE"
+	"$MACBINARY" decode -o "$OUTFILE" "$INFILE"
 	exit $?
 fi
 
@@ -38,7 +31,7 @@
 RSRCFORKFILE="$OUTFILE.rsrc"
 INFOFILE="$OUTFILE.info"
 
-(cd "$OUTDIR" && macunpack -3 "$INFILE" || exit $?)
+macunpack -3 "$INFILE" || exit $?
 cp "$DATAFORKFILE" "$OUTFILE" || exit $?
 cp "$RSRCFORKFILE" "$OUTFILE/rsrc" || exit $?
 rm -f "$DATAFORKFILE" "$RSRCFORKFILE" "$INFOFILE"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130522/d7e383f1/attachment-0001.html>


More information about the macports-changes mailing list