shithub: rc

ref: 05158bda287766580ed5e8e3416d0046678c7d3b
dir: /bin/mailrio/

View raw version
#!/bin/rc -e
rfork n
if(! ~ $#* 2){
	echo usage: $0 mbox upasname >[1=2]
	exit usage
}
unmount /mnt/plumb
plumbsrv=()
plumber -s plumb.$pid
upas/fs -Cf $1 >>[2]/tmp/mailrio.log || exit
upasname=$2
wsz=`{read -c 48 /mnt/wsys/wctl}
facerect=( \
	0 \
	0 \
	`{echo $wsz(3) - $wsz(1) | pc} \
	116 \
)
cat <<! >/tmp/mailrio.$pid
#!/bin/rc
label $upasname
window -r $facerect faces -i
!
chmod +x /tmp/mailrio.$pid
bof -i /tmp/mailrio.$pid
rm /tmp/mailrio.$pid
unmount /mail/fs
unmount /mnt/plumb
rm /srv/plumb.$pid