[Vm-dev] [commit][3030] Go meta young lad! Generate the getGoodCog/SpurVM. sh scripts automatically

commits at squeakvm.org commits at squeakvm.org
Thu Jul 3 12:46:18 UTC 2014


Revision: 3030
Author:   eliot
Date:     2014-07-03 05:46:14 -0700 (Thu, 03 Jul 2014)
Log Message:
-----------
Go meta young lad!  Generate the getGoodCog/SpurVM.sh scripts automatically
on uploading the VMs.  Edit the various scripts to use these generic scripts.

Modified Paths:
--------------
    branches/Cog/image/buildspurtrunkimage.sh
    branches/Cog/image/buildsqueak45vmmakerimage.sh
    branches/Cog/image/buildsqueaktrunkvmmakerimage.sh
    branches/Cog/image/envvars.sh
    branches/Cog/scripts/uploadvms

Added Paths:
-----------
    branches/Cog/image/getGoodCogVM.sh
    branches/Cog/image/getGoodSpurVM.sh
    branches/Cog/image/makegetvmscripts.sh

Removed Paths:
-------------
    branches/Cog/image/get3021spurvm.sh
    branches/Cog/image/get3021vm.sh

Modified: branches/Cog/image/buildspurtrunkimage.sh
===================================================================
--- branches/Cog/image/buildspurtrunkimage.sh	2014-07-03 02:52:10 UTC (rev 3029)
+++ branches/Cog/image/buildspurtrunkimage.sh	2014-07-03 12:46:14 UTC (rev 3030)
@@ -1,7 +1,7 @@
 #!/bin/sh
 . ./envvars.sh
 ./getsqueak45.sh
-. ./get3021vm.sh
+. ./getGoodCogVM.sh
 
 cp -p $SQUEAK45.image trunk46forspur.image
 cp -p $SQUEAK45.changes trunk46forspur.changes
@@ -20,7 +20,7 @@
 	for f in *VMMaker*spur.image; do
 		if test -f "$f"; then
 			IMAGE="$f"
-.			./get3021spurvm.sh
+.			./getGoodSpurVM.sh
 			break 2
 		fi
 	done
@@ -28,7 +28,7 @@
 		for f in *VMMaker*.image; do
 			if test -f "$f"; then
 				IMAGE="$f"
-.				./get3021vm.sh
+.				./getGoodCogVM.sh
 				break 2
 			fi
 		done
@@ -48,6 +48,6 @@
 mv trunk46forspur-spur.changes trunk46-spur.changes
 
 # Now load the modified packages
-. ./get3021spurvm.sh
+. ./getGoodSpurVM.sh
 echo $VM trunk46-spur.image LoadSpurPackagesFromTempDir.st
 $VM trunk46-spur.image LoadSpurPackagesFromTempDir.st

Modified: branches/Cog/image/buildsqueak45vmmakerimage.sh
===================================================================
--- branches/Cog/image/buildsqueak45vmmakerimage.sh	2014-07-03 02:52:10 UTC (rev 3029)
+++ branches/Cog/image/buildsqueak45vmmakerimage.sh	2014-07-03 12:46:14 UTC (rev 3030)
@@ -1,7 +1,7 @@
 #!/bin/bash
 . ./envvars.sh
 ./getsqueak45.sh
-. ./get3021vm.sh
+. ./getGoodCogVM.sh
 
 cp -p $SQUEAK45.image CogVMMaker.image
 cp -p $SQUEAK45.changes CogVMMaker.changes

Modified: branches/Cog/image/buildsqueaktrunkvmmakerimage.sh
===================================================================
--- branches/Cog/image/buildsqueaktrunkvmmakerimage.sh	2014-07-03 02:52:10 UTC (rev 3029)
+++ branches/Cog/image/buildsqueaktrunkvmmakerimage.sh	2014-07-03 12:46:14 UTC (rev 3030)
@@ -1,7 +1,7 @@
 #!/bin/bash
 . ./envvars.sh
 ./getsqueak45.sh
-. ./get3021vm.sh
+. ./getGoodCogVM.sh
 
 cp -p $SQUEAK45.image CogVMMaker.image
 cp -p $SQUEAK45.changes CogVMMaker.changes

Modified: branches/Cog/image/envvars.sh
===================================================================
--- branches/Cog/image/envvars.sh	2014-07-03 02:52:10 UTC (rev 3029)
+++ branches/Cog/image/envvars.sh	2014-07-03 12:46:14 UTC (rev 3030)
@@ -19,8 +19,8 @@
 	OSREL=`uname -r | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*$/\1.\2.\3/'`
 fi
 
-test "$OS" = Darwin && function quietmd5 () { /sbin/md5 -q "$1"; }
-test "$OS" = Darwin || function quietmd5 () { /usr/bin/md5sum "$1" | sed 's/ .*$//'; }
+test "$OS" = Darwin && function quietmd5 () { /sbin/md5 -q "$1" 2>/dev/null; }
+test "$OS" = Darwin || function quietmd5 () { /usr/bin/md5sum "$1" | sed 's/ .*$//' 2>/dev/null; }
 
 function get_vm_from_tar() # VM VMHASH VMARC VMARCHASH
 {	VM="$1"

Deleted: branches/Cog/image/get3021spurvm.sh
===================================================================
--- branches/Cog/image/get3021spurvm.sh	2014-07-03 02:52:10 UTC (rev 3029)
+++ branches/Cog/image/get3021spurvm.sh	2014-07-03 12:46:14 UTC (rev 3030)
@@ -1,30 +0,0 @@
-#!/bin/sh
-# Sets the VM env var to the r3021 Cog Spur VM for the current platform.
-# will download and install the VM in this directory if necessary.
-#set -v
-. ./envvars.sh
-
-if wget --help >/dev/null; then
-	true
-else
-	echo 'could not find wget.  you can find instructions on how to install it on google.' 1>&2
-	 exit 1
-fi
-
-URL=http://www.mirandabanda.org/files/Cog/VM/VM.r3021/
-
-case "$OS" in
-Darwin) get_vm_from_tar \
-			CogSpur.app/Contents/MacOS/Squeak fb003318b8fbb7a50dc9f6d9dd82b454 \
-			CogSpur.app-14.25.3021.tgz 6767d878f8331a0728ca3fb19cfd754e
-	VM=CogSpur.app/Contents/MacOS/Squeak;;
-Linux) get_vm_from_tar \
-	cogspurlinuxht/lib/squeak/4.0-3021/squeak e826b2307e1618ee3492de7fae0ae594 \
-	cogspurlinuxht-14.25.3021.tgz ad01f54ae5d3c2c3b4d8e8f1d640fedd
-	VM=cogspurlinuxht/squeak;;
-CYGWIN*) get_vm_from_zip \
-			cogspurwin/SqueakConsole.exe 8d8a644ef1bf7e201862e49ce9358e11 \
-			cogspurwin-14.25.3021.zip 407da5d8f34482be96eaa299907c51eb
-	VM=cogwin/SqueakConsole.exe;;
-*)	echo "don't know how to run Squeak on your system.  bailing out." 1>&2; exit 2
-esac

Deleted: branches/Cog/image/get3021vm.sh
===================================================================
--- branches/Cog/image/get3021vm.sh	2014-07-03 02:52:10 UTC (rev 3029)
+++ branches/Cog/image/get3021vm.sh	2014-07-03 12:46:14 UTC (rev 3030)
@@ -1,38 +0,0 @@
-#!/bin/sh
-# Sets the VM env var to the r3021 Cog VM for the current platform.
-# will download and install the VM in this directory if necessary.
-#set -v
-. ./envvars.sh
-
-if wget --help >/dev/null ; then
-	true
-else
-	echo 'could not find wget.  you can find instructions on how to install it on google.' 1>&2
-	 exit 1
-fi
-
-URL=http://www.mirandabanda.org/files/Cog/VM/VM.r3021/
-
-case "$OS" in
-Darwin) get_vm_from_tar \
-			Cog.app/Contents/MacOS/Squeak 8f6f98f8bc7e79ceb19734286d0dbe1b \
-			Cog.app-14.25.3021.tgz ac6a54d861cf6fb46d7b926f6d8baf50
-		VM=Cog.app/Contents/MacOS/Squeak;;
-Linux)
-	if expr $OSREL \> 2.6.12; then
-		get_vm_from_tar \
-		coglinuxht/lib/squeak/4.0-3021/squeak de88791228cbb74925de35cb126f317b \
-		coglinuxht-14.25.3021.tgz 3486b358193430d46094ea3abfe9a093
-		VM=coglinuxht/lib/squeak/4.0-3021/squeak
-	else
-		get_vm_from_tar \
-		coglinux/lib/squeak/4.0-3021/squeak 77b02e13a80bbea045fafc59a6f963ec \
-		coglinux-14.25.3021.tgz 9c87dc67d7505be3b4c74497fa09f61c
-		VM=coglinux/lib/squeak/4.0-3021/squeak
-	fi;;
-CYGWIN*) get_vm_from_zip \
-			cogwin/SqueakConsole.exe c72e3239aa011374896361d08d184afc \
-			cogwin-14.25.3021.zip e0189adc34a8c8f6f015ae621245c475
-	VM=cogwin/SqueakConsole.exe;;
-*)	echo "don't know how to run Squeak on your system.  bailing out." 1>&2; exit 2
-esac

Added: branches/Cog/image/getGoodCogVM.sh
===================================================================
--- branches/Cog/image/getGoodCogVM.sh	                        (rev 0)
+++ branches/Cog/image/getGoodCogVM.sh	2014-07-03 12:46:14 UTC (rev 3030)
@@ -0,0 +1,38 @@
+#!/bin/sh
+# Sets the VM env var to the r3029 Cog VM for the current platform.
+# will download and install the VM in this directory if necessary.
+
+TAG=14.26.3029
+REV=3029
+URL=http://www.mirandabanda.org/files/Cog/VM/VM.r$REV/
+
+. ./envvars.sh
+
+if wget --help >/dev/null ; then
+    true
+else
+    echo 'could not find wget.  you can find instructions on how to install it on google.' 1>&2
+     exit 1
+fi
+
+case "$OS" in
+Darwin) get_vm_from_tar \
+            Cog.app/Contents/MacOS/Squeak a8836be2d6d62bd5711dbfdd043757b4 \
+            Cog.app-$TAG.tgz d7a301c471515ea90c69f62225a93555
+        VM=Cog.app/Contents/MacOS/Squeak;;
+Linux)
+    if expr $OSREL \> 2.6.12; then
+        get_vm_from_tar \
+        coglinuxht/lib/squeak/4.0-$REV/squeak 9d0f27d9b71f1dacc31b8beafa4c3b6d \
+        coglinuxht-$TAG.tgz 2300e4d895b26bfcc6a652841781ac90
+    else
+        get_vm_from_tar \
+        coglinux/lib/squeak/4.0-$REV/squeak eff9d1c4b5c64c23109dff0f0d634ae9 \
+        coglinux-$TAG.tgz 655db6462a9d804983dffd3eda4d0531
+    fi;;
+CYGWIN*) get_vm_from_zip \
+            cogwin/SqueakConsole.exe e6ebcb8a8c3f585cad66c7a54e47206f \
+            cogwin-$TAG.zip cea244b795ac9cebc7b47ac94af6a5a2
+    VM=cogwin/SqueakConsole.exe;;
+*)  echo "don't know how to run Squeak on your system.  bailing out." 1>&2; exit 2
+esac


Property changes on: branches/Cog/image/getGoodCogVM.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/image/getGoodSpurVM.sh
===================================================================
--- branches/Cog/image/getGoodSpurVM.sh	                        (rev 0)
+++ branches/Cog/image/getGoodSpurVM.sh	2014-07-03 12:46:14 UTC (rev 3030)
@@ -0,0 +1,32 @@
+#!/bin/sh
+# Sets the VM env var to the r3029 Cog Spur VM for the current platform.
+# will download and install the VM in this directory if necessary.
+
+TAG=14.26.3029
+REV=3029
+URL=http://www.mirandabanda.org/files/Cog/VM/VM.r$REV/
+
+. ./envvars.sh
+
+if wget --help >/dev/null ; then
+    true
+else
+    echo 'could not find wget.  you can find instructions on how to install it on google.' 1>&2
+     exit 1
+fi
+
+case "$OS" in
+Darwin) get_vm_from_tar \
+            CogSpur.app/Contents/MacOS/Squeak 19a64f72acb1e2d3d6f2d47410e6e26a \
+            CogSpur.app-$TAG.tgz bbf5edcee366fd4e0f0340ff9fbcfcb3
+        VM=CogSpur.app/Contents/MacOS/Squeak;;
+Linux) get_vm_from_tar \
+        cogspurlinuxht/lib/squeak/4.0-$REV/squeak eb322de8e2bd4ce388573733f8f01405 \
+        cogspurlinuxht-$TAG.tgz ae8abc7d0d4c7d7c4290a93d173179f3
+    VM=cogspurlinuxht/squeak;;
+CYGWIN*) get_vm_from_zip \
+            cogspurwin/SqueakConsole.exe 4bc6353fa35fa60e7bd2dfc3ec2fa4a8 \
+            cogspurwin-$TAG.zip b3d0fd96e0d17fdb79f9c9d31f816fde
+    VM=cogspurwin/SqueakConsole.exe;;
+*)  echo "don't know how to run Squeak on your system.  bailing out." 1>&2; exit 2
+esac


Property changes on: branches/Cog/image/getGoodSpurVM.sh
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/image/makegetvmscripts.sh
===================================================================
--- branches/Cog/image/makegetvmscripts.sh	                        (rev 0)
+++ branches/Cog/image/makegetvmscripts.sh	2014-07-03 12:46:14 UTC (rev 3030)
@@ -0,0 +1,138 @@
+#!/bin/sh
+# Create the getGoodCogVM.sh & getGoodSpurVM.sh scripts.
+
+cd `dirname $0`
+REV=`grep 'SvnRawRevisionString.*Rev:' ../platforms/Cross/vm/sqSCCSVersion.h \
+	| sed 's/^.*Rev: \([0-9][0-9]*\) $";/\1/'`
+TAG=`date +%g.%U.`$REV
+echo REV=$REV TAG=$TAG
+
+. ./envvars.sh
+
+cat >getGoodCogVM.sh <<END
+#!/bin/sh
+# Sets the VM env var to the r$REV Cog VM for the current platform.
+# will download and install the VM in this directory if necessary.
+
+TAG=$TAG
+REV=$REV
+URL=http://www.mirandabanda.org/files/Cog/VM/VM.r\$REV/
+
+. ./envvars.sh
+
+if wget --help >/dev/null ; then
+    true
+else
+    echo 'could not find wget.  you can find instructions on how to install it on google.' 1>&2
+     exit 1
+fi
+
+case "\$OS" in
+Darwin) get_vm_from_tar \\
+END
+
+echo -n '            Cog.app/Contents/MacOS/Squeak ' >>getGoodCogVM.sh
+echo -n `quietmd5 ../products/Cog.app/Contents/MacOS/Squeak` >>getGoodCogVM.sh
+echo ' \' >>getGoodCogVM.sh
+echo -n '            Cog.app-$TAG.tgz ' >>getGoodCogVM.sh
+quietmd5 ../products/Cog.app-$TAG.tgz >>getGoodCogVM.sh
+
+cat >>getGoodCogVM.sh <<END
+        VM=Cog.app/Contents/MacOS/Squeak;;
+Linux)
+    if expr \$OSREL \\> 2.6.12; then
+        get_vm_from_tar \\
+END
+
+echo -n '        coglinuxht/lib/squeak/4.0-$REV/squeak ' >>getGoodCogVM.sh
+echo -n `quietmd5 ../products/coglinuxht/lib/squeak/4.0-$REV/squeak` >>getGoodCogVM.sh
+echo ' \' >>getGoodCogVM.sh
+echo -n '        coglinuxht-$TAG.tgz ' >>getGoodCogVM.sh
+quietmd5 ../products/coglinuxht-$TAG.tgz >>getGoodCogVM.sh
+
+cat >>getGoodCogVM.sh <<END
+    else
+        get_vm_from_tar \\
+END
+
+echo -n '        coglinux/lib/squeak/4.0-$REV/squeak ' >>getGoodCogVM.sh
+echo -n `quietmd5 ../products/coglinux/lib/squeak/4.0-$REV/squeak` >>getGoodCogVM.sh
+echo ' \' >>getGoodCogVM.sh
+echo -n '        coglinux-$TAG.tgz ' >>getGoodCogVM.sh
+quietmd5 ../products/coglinux-$TAG.tgz >>getGoodCogVM.sh
+cat >>getGoodCogVM.sh <<END
+    fi;;
+CYGWIN*) get_vm_from_zip \\
+END
+
+echo -n '            cogwin/SqueakConsole.exe ' >>getGoodCogVM.sh
+echo -n `quietmd5 ../products/cogwin/SqueakConsole.exe` >>getGoodCogVM.sh
+echo ' \' >>getGoodCogVM.sh
+echo -n '            cogwin-$TAG.zip ' >>getGoodCogVM.sh
+quietmd5 ../products/cogwin-$TAG.zip >>getGoodCogVM.sh
+
+cat >>getGoodCogVM.sh <<END
+    VM=cogwin/SqueakConsole.exe;;
+*)  echo "don't know how to run Squeak on your system.  bailing out." 1>&2; exit 2
+esac
+END
+
+chmod a+x getGoodCogVM.sh
+
+cat >getGoodSpurVM.sh <<END
+#!/bin/sh
+# Sets the VM env var to the r$REV Cog Spur VM for the current platform.
+# will download and install the VM in this directory if necessary.
+
+TAG=$TAG
+REV=$REV
+URL=http://www.mirandabanda.org/files/Cog/VM/VM.r\$REV/
+
+. ./envvars.sh
+
+if wget --help >/dev/null ; then
+    true
+else
+    echo 'could not find wget.  you can find instructions on how to install it on google.' 1>&2
+     exit 1
+fi
+
+case "\$OS" in
+Darwin) get_vm_from_tar \\
+END
+
+echo -n '            CogSpur.app/Contents/MacOS/Squeak ' >>getGoodSpurVM.sh
+echo -n `quietmd5 ../products/CogSpur.app/Contents/MacOS/Squeak` >>getGoodSpurVM.sh
+echo ' \' >>getGoodSpurVM.sh
+echo -n '            CogSpur.app-$TAG.tgz ' >>getGoodSpurVM.sh
+quietmd5 ../products/CogSpur.app-$TAG.tgz >>getGoodSpurVM.sh
+
+cat >>getGoodSpurVM.sh <<END
+        VM=CogSpur.app/Contents/MacOS/Squeak;;
+Linux) get_vm_from_tar \\
+END
+
+echo -n '        cogspurlinuxht/lib/squeak/4.0-$REV/squeak ' >>getGoodSpurVM.sh
+echo -n `quietmd5 ../products/cogspurlinuxht/lib/squeak/4.0-$REV/squeak` >>getGoodSpurVM.sh
+echo ' \' >>getGoodSpurVM.sh
+echo -n '        cogspurlinuxht-$TAG.tgz ' >>getGoodSpurVM.sh
+quietmd5 ../products/cogspurlinuxht-$TAG.tgz >>getGoodSpurVM.sh
+
+cat >>getGoodSpurVM.sh <<END
+    VM=cogspurlinuxht/squeak;;
+CYGWIN*) get_vm_from_zip \\
+END
+
+echo -n '            cogspurwin/SqueakConsole.exe ' >>getGoodSpurVM.sh
+echo -n `quietmd5 ../products/cogspurwin/SqueakConsole.exe` >>getGoodSpurVM.sh
+echo ' \' >>getGoodSpurVM.sh
+echo -n '            cogspurwin-$TAG.zip ' >>getGoodSpurVM.sh
+quietmd5 ../products/cogspurwin-$TAG.zip >>getGoodSpurVM.sh
+
+cat >>getGoodSpurVM.sh <<END
+    VM=cogspurwin/SqueakConsole.exe;;
+*)  echo "don't know how to run Squeak on your system.  bailing out." 1>&2; exit 2
+esac
+END
+
+chmod a+x getGoodSpurVM.sh


Property changes on: branches/Cog/image/makegetvmscripts.sh
___________________________________________________________________
Added: svn:executable
   + *

Modified: branches/Cog/scripts/uploadvms
===================================================================
--- branches/Cog/scripts/uploadvms	2014-07-03 02:52:10 UTC (rev 3029)
+++ branches/Cog/scripts/uploadvms	2014-07-03 12:46:14 UTC (rev 3030)
@@ -154,3 +154,5 @@
 scp -p ChangeHistory ../history/README.$REV $ARCHIVES "$@" $RemoteUser:$RemoteRoot/VM.r$REV
 echo ssh $RemoteUser $RemoteRoot/VM.r$REV/* \\\; ls -al $RemoteRoot/VM.r$REV
 ssh $RemoteUser chmod a-w $RemoteRoot/VM.r$REV/* \; ls -al $RemoteRoot/VM.r$REV
+
+test -x image/makegetvmscripts.sh && (image/makegetvmscripts.sh)



More information about the Vm-dev mailing list