#!/bin/rc # synchronizes rootscore files mounted at /n/9fat/scorenames and /n/remote9fat/scorenames remote=none if(~ $#1 1) remote=$1 if(! test -e /n/9fat/scorenames){ echo didnt find /n/9fat/scorenames >[2=1] exit } if(! test -e /n/remote9fat/scorenames){ if(! test -e /n/$remote/fatsrv) rimport -p $remote /srv /n/$remote mount /n/$remote/fatsrv /n/remote9fat } if(! test -e /n/remote9fat/scorenames){ echo didnt find /n/remote9fat/scorenames >[2=1] exit } sort /n/remote9fat/scorenames | uniq >/tmp/scores.$pid sort /n/9fat/scorenames | uniq >>/tmp/scores.$pid newname=`{cat /tmp/scores.$pid |sort |uniq -u |sed 's/ /⊞/g'} if(! ~ $#newname 0){ for(i in $newname){ echo $i echo $i >>/n/9fat/scorenames } cat /n/9fat/scorenames |sed 's/⊞/ /g' | sort |uniq >/tmp/scores.$pid cp /tmp/scores.$pid /n/9fat/scorenames cp /tmp/scores.$pid /n/remote9fat/scorenames } rm /tmp/scores.$pid