#!/bin/rc
rfork e
if(~ $#* 0 1){
echo 'usage: issue/move dst 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
# }
#}
dst=$1
issue=$2
state=$3
i=$state/$issue
j=$issue
echo $i
if(! test -d $tracker/$i)
echo 'no such issue' $tracker/$i >[1=2]
if not if(test -d $tracker/$dst/$j)
echo 'already have' $tracker/$dst/$j >[1=2]
if not
ls -ldp $tracker/$i >$tracker/$i/origls &&
mkdir $tracker/$dst/$j &&
dircp $tracker/$i $tracker/$dst/$j &&
rm -rf $tracker/$i &&
test -s $tracker/$dst/$j/email &&
# Only the lab has this
# issue/notify $dst/$j
|