CVS

Stephen Weeks MLton@sourcelight.com
Fri, 28 Sep 2001 15:13:45 -0700


> Hope so.  Other cool news, Cornell brought a Linux cluster on-line: a set
> of 20 machines, all dual PIII 1GHz w/ 512M.  

Cool.  I'm sure you can keep them occupied.  Let us know when you set a new
self-compile record.

> So, Steve, could you send me some of those scripts you use to do remote
> builds?

--------------------------------------------------------------------------------
remote-make
--------------------------------------------------------------------------------
#!/bin/sh

name=`basename $0`

function usage() {
	echo >&2 "usage: $name [machine]"
	exit 1
}

case "$#" in
0)
	machine='starlinux'
;;
1)
	machine=$1
;;
*)
	usage
;;
esac

root="$HOME/mlton"
src="$root/src"
lib="$root/lib"
bin="$root/bin"
mlton="$bin/mlton"
d=`date +%Y-%m-%d-%H:%M`

#			rm -f mlton/mlton && make &&
#			&& rm -f mlton/mlton && make' 2>&1 | 

( cd $root && tar c -p --dereference --exclude lib/stable bin/mlton include lib src ) | 
	rsh $machine 'rm -rf mlton && mkdir -p mlton && cd mlton && 
			tar.read && cd src && make' 2>&1 |
	tee /tmp/z.remote-make.$machine.$d &&
(
	remote="/net/$machine/$root"
	for f in lib/mlton-compile lib/world.mlton;
	do	
		cp -p $remote/$f $root/$f
	done
)


--------------------------------------------------------------------------------
remote-regression
--------------------------------------------------------------------------------
#!/bin/sh

name=`basename $0`

function usage() {
	echo >&2 "usage: $name [machine]"
	exit 1
}

case "$#" in
0)
	machine='starlinux'
;;
1)
	machine=$1
;;
*)
	usage
;;
esac

root="$HOME/mlton"
src="$root/src"
lib="$root/lib"
bin="$root/bin"
mlton="$bin/mlton"

cd $src
( 
	cd $root
	tar.write bin include lib src/bin src/benchmark src/lib src/mllex \
		src/mlyacc src/mlprof src/regression
) | /usr/bin/rsh $machine 'rm -rf mlton && mkdir mlton && cd mlton && 
	tar.read && src/bin/regression' 2>&1 |
	tee /tmp/z.regression.$machine

--------------------------------------------------------------------------------
remote-rpms
--------------------------------------------------------------------------------
#!/bin/sh -

name=`basename $0`

function usage() {
	echo >&2 "usage: $name [machine]"
	exit 1
}

case "$#" in
0)
	machine='starlinux'
;;
1)
	machine=$1
;;
*)
	usage
;;
esac

root="$HOME/mlton"
src="$root/src"
lib="$root/lib"
bin="$root/bin"
mlton="$bin/mlton"

( 
	cd $root
	tar.write bin include lib
) | rsh $machine 'rm -rf mlton && mkdir mlton && cd mlton && tar.read &&
	export PATH="$HOME/mlton/bin":$PATH &&
	mkdir -p src/bin &&
	cp /net/eponym/home/sweeks/mlton/src/bin/make-rpms src/bin &&
	src/bin/make-rpms -home' 2>&1 |
	tee /tmp/z.make-rpms.$machine

remote="/net/$machine/home/sweeks/mlton/src/rpms"
local="$HOME/mlton/rpms"
cp -p $remote/*.i386.rpm $local/RPMS/i386
cp -p $remote/*.src.rpm $local/SRPMS