dircp 234 B

123456789
  1. #!/bin/rc
  2. # dircp src dest - copy a tree with tar
  3. switch($#*){
  4. case 2
  5. # explicitly mention /fd/* to work with both plan 9 and ape tar
  6. @{cd $1 && tar cf /fd/1 .} | @{cd $2 && tar xTf /fd/0}
  7. case *
  8. echo usage: dircp from to >[1=2]
  9. }