henesyinit from lsubb0c8bdb6 years agoHistory
29 lines · 459 B · Text
RawDownload
#!/bin/rc fn usage {	echo 'repl/new repl id dir [excldir...]'>[1=2]	exit usage}  if (test  $#* -lt 3)	usagecfg=$1 ; shiftid=$1 ; shiftdir=$1 ; shiftif (! ~ $#* 0)	excl=-i^$*db=`{echo $cfg | sed  -e 's/$/.db/'} cat >$cfg <<!#!/bin/rcdb=$dbdir=$direxcl=($excl)!chmod +x $cfgrepl/scandb  -t -n $id $excl $dir $dbecho replica $cfg defined.echo you may want to move $db to /dist/repl/ andecho put $cfg at /lib/repl after editing it.exit ''