Branch: Tag:

2001-01-19

2001-01-19 14:06:07 by Mirar (Pontus Hagland) <pike@sort.mirar.org>

added --info

Rev: lib/master.pike.in:1.141

1:   /* -*- Pike -*-    * -  * $Id: master.pike.in,v 1.140 2001/01/19 13:51:37 mirar Exp $ +  * $Id: master.pike.in,v 1.141 2001/01/19 14:06:07 mirar Exp $    *    * Master-file for Pike.    *
1208:    object tmp;    string a,b;    array q; -  int list_features=0; +  string postparseaction=0; +  mixed v;       _pike_file_name = orig_argv[0];   
1255:    ({"version",tmp->NO_ARG,({"-v","--version"})}),    ({"help",tmp->NO_ARG,({"-h","--help"})}),    ({"features",tmp->NO_ARG,({"--features"})}), +  ({"info",tmp->NO_ARG,({"--info"})}),    ({"execute",tmp->HAS_ARG,({"-e","--execute"})}),    ({"debug_without",tmp->HAS_ARG,({"--debug-without"})}),    ({"preprocess",tmp->HAS_ARG,({"-E","--preprocess"})}),
1388:    " -h --help : see this message\n"    " -v --version : See what version of pike you have.\n"    " --features : List Pike features.\n" +  " --info : List information about the Pike build and setup.\n"    " --show-paths : See the paths and master that pike uses.\n"    " -s# : Set stack size\n"    " -m <file> : Use <file> as master object.\n"
1397:    exit(0);       case "features": -  list_features=1; +  postparseaction="features";    break;    -  +  case "info": +  postparseaction="info"; +  break; +     case "showpaths":    werror("Include path : " + pike_include_path*"\n"    " " + "\n"
1425:    argv = tmp->get_args(argv,1);    }    -  if (list_features) +  switch (postparseaction)    { -  mixed v; -  +  case "features":    v = resolv("Tools");    if (v) v = v["Install"];    if (v) v = v["features"];
1440:       _static_modules.files()->_stdout->write(v()*"\n"+"\n");    exit(0); +  +  case "info": +  function w=_static_modules.files()->_stdout->write; +  w("Software......Pike\n" +  "Version......."+version()+"\n" +  "WWW...........http://pike.idonex.se/\n" +  "Main author...Fredrik Hübinette\n" +  "\n"); +  +  w("pike binary..."+_pike_file_name+"\n"); +  w("master.pike..."+__FILE__+"\n"); +  +  w("Module path..." + pike_module_path*"\n" +  " " + "\n" +  "Include path.." + pike_include_path*"\n" +  " " + "\n" +  "Program path.." + pike_program_path*"\n" +  " " + "\n" +  "\n"); +  +  v = resolv("Tools"); +  if (v) v = v["Install"]; +  if (v) v = v["features"]; +  if (!v) +  { +  werror("Could not resolv Tools.Install.features\n"); +  exit(1);    }    -  +  w("Features......"+v()*"\n "+"\n"); +  +  +  exit(0); +  } +     random_seed(time() + (getpid() * 0x11111111));       if(sizeof(argv)==1)