Branch: Tag:

1998-01-21

1998-01-21 19:35:01 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

updated

Rev: NT/tools/cp:1.2
Rev: NT/tools/install:1.2
Rev: NT/tools/lib:1.11
Rev: NT/tools/mkdir:1.2
Rev: NT/tools/rntcc:1.9
Rev: NT/tools/sprshd:1.4

20:       write("Doing "+cmd*" "+"\n");    -  switch(cmd[0]) +  switch(lower_case(cmd[0]))    { -  +  case "mkdir": +  { +  io->write(sprintf("%4c",0)); +  mkdir(combine_path(combine_path(getcwd(),dir),cmd[1])); +  io->write(sprintf("%4c",0)); +  break; +  } +  +  case "copy": +  { +  string from=combine_path(combine_path(getcwd(),dir),cmd[1]); +  string to=combine_path(combine_path(getcwd(),dir),cmd[2]); +  +  if(mixed stat=file_stat(to)) +  if(stat[1]==-2) +  to=combine_path(to,cmd[1]); +  +  io->write(sprintf("%4c",0)); +  io->write(sprintf("%4c",!Stdio.cp(from,to))); +  break; +  }    case "getenv":    {    string s=getenv(cmd[1])+"\n";
79:       string *hosts=gethostbyname(argv[2])[1];    +  write("Ready.\n");    while(1)    {    if(object io=accept())