email 409 B

123456789101112131415161718192021222324252627
  1. #!/bin/rc
  2. rfork e
  3. if(! ~ $#* 2){
  4. echo 'usage: patch/email name email-address' >[1=2]
  5. exit usage
  6. }
  7. if(! test -d /n/sources/patch){
  8. rfork n
  9. 9fs sources
  10. }
  11. if(! test -d /n/sources/patch/$1){
  12. echo 'no such patch' /n/sources/patch/$1 >[1=2]
  13. exit nopatch
  14. }
  15. cd /n/sources/patch/$1 || exit nopatch
  16. if(! patch/okay .){
  17. echo 'bad patch: '$status >[1=2]
  18. exit badpatch
  19. }
  20. >email
  21. chmod 660 email
  22. echo $2 >email