#!/bin/rc # from arena partition to arena files # need running venti httpd (src) rfork en venti=127.0.0.1 hget http://$venti:8000/index >index if(! ~ $status ''){ echo unable to get index >[1=2] exit } fn x { arenaname=$1 arenamedia=$arenaname.media arenapart=$2 if(! test -f $arenapart){ echo $arenapart not found >[1=2] exit } if(test -f $arenamedia) echo skeeping $arenapart >[1=2] if not { echo venti/rdarena $arenapart $arenaname '>'$arenamedia venti/rdarena $arenapart $arenaname >$arenamedia if(! ~ $status '') exit sha1sum $arenamedia >>sha1sum } } cat index | awk ' /^arena=/ { arena=substr($1, 7); } /^ arena=/ { printf("x %s %s\n", arena, $3); } ' |rc >log >[2=1]