shithub: rc

ref: b6f2ee6071be8b989bc2ceed52e0623a56145931
dir: /syncbv91/

View raw version
#!/bin/rc -e
rfork n
if(! sshfs tcp!bv91!8022){
	echo ssh failed: $status
	exit ssh
}
cd
for(i in m*){
	if(! test -d /n/ssh/$i){
		mkdir /n/ssh/storage/external-1/$i
		ssh tcp!bv91!8022 ln -s storage/external-1/$i $i
		clone -T $i/* /n/ssh/$i
	}
	if not
		syncab $i /n/ssh/$i | tee -a /tmp/sync.$pid
}
syncab /n/ssh/Pictures $home/lib/i | tee -a /tmp/sync.$pid
echo proceed?
if(! ~ `{read} yes){
	echo exiting
	exit nope
}
. /tmp/sync.$pid && rm /tmp/sync.$pid