[m-rev.] for review: stop gator from copying sources to hosts that already have it
Samrith UONG
samuong at gmail.com
Mon Feb 20 12:49:31 AEDT 2006
For review by Ralph or Julien.
Estimated hours taken: 0.2
extras/gator/gator:
Use gzip instead of bzip2, which is more likely to be available
(and for some reason has disappeared off leopard).
Be a bit smarter about copying source code to other hosts.
Don't copy it if it already exists on the remote machine. Also
delete it from the temporary directory once we're done with it
so we don't waste space.
Index: gator
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/extras/gator/gator,v
retrieving revision 1.3
diff -r1.3 gator
99,100c99,100
< ssh "$host" '(cd '"$benchmarks"' && tar -cf - .) | bzip2' \
< >"$tmp"/benchmarks.tar.bz2
---
> ssh "$host" '(cd '"$benchmarks"' && tar -cf - .) | gzip' \
> >"$tmp"/benchmarks.tar.gz
107c107
< if [ ! -f "$tmp"/benchmarks.tar.bz2 ]
---
> if [ ! -f "$tmp"/benchmarks.tar.gz ]
119,124c119,128
< printf "==> Copying sources to %s:%s\n" "$host" "$benchmarks" >&2
<
< ssh "$host" rm -rf "$benchmarks"
< ssh "$host" mkdir "$benchmarks"
< ssh "$host" 'bzip2 -dc - | (cd '"$benchmarks"' && tar -xf -)' \
< <"$tmp"/benchmarks.tar.bz2
---
> if ssh "$host" [ ! -d "$benchmarks" ]
> then
> printf "==> Copying sources to %s:%s\n" "$host" "$benchmarks" \
> >&2
>
> ssh "$host" rm -rf "$benchmarks"
> ssh "$host" mkdir "$benchmarks"
> ssh "$host" 'gzip -dc - | (cd '"$benchmarks"' && tar -xf -)' \
> <"$tmp"/benchmarks.tar.gz
> fi
128a133,134
> rm "$tmp"/benchmarks.tar.gz
>
212c218
< bzip2 "$err"
---
> gzip "$err"
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list