#!/bin/rc
rfork e
if(! ~ $#* 2){
echo 'usage: issue/note issue-name state' >[1=2]
exit usage
}
# Doesn't (yet?) exist
#tracker=/n/sources/issue
tracker=./test
#if(~ $tracker /n/sources/issue){
# if(! test -d /n/sources/issue){
# rfork n
# 9fs sources
# }
#}
if(! test -d $tracker/$2/$1){
echo 'no such issue' $tracker/$2/$1 >[1=2]
exit noissue
}
cd $tracker/$2/$1 || exit noissue
if(~ `{cat /proc/$pid/fd | awk 'NR==2{print $NF}'} */dev/cons && ~ `{ls -l /dev/consctl | awk '{print $1}'} *rw*){
>/dev/consctl {
echo holdon
{echo `{date} `{cat /dev/user}
cat |sed 's/^/ /'; echo } >>notes
}
}
if not
{echo `{date} `{cat /dev/user}
cat |sed 's/^/ /'; echo } >>notes
|