shithub: bin.rc

ref: 1bab993af3da2ba2ee9e84d8602c9ae67f7c58d1
dir: /bin/plumb.dir/

View raw version
#!/bin/rc
rfork e
fn usage {
	>[2=1] echo $0
	exit usage
}

while(~ $1 -* && ! ~ $1 --){
	switch($1){
	case *
		usage
	}
	shift
}
if(~ $1 --)
	shift

t=/dev/wsys/`{cat $wsdir/target}^/text
echo cd $1 >/tmp/text
cat $t >>/tmp/text
cp /tmp/text $t