Roxen.git / server / base_server / roxenloader.pike

version» Context lines:

Roxen.git/server/base_server/roxenloader.pike:1982:   #else    @((getenv("RX_FONTPATH") || "")/"," - ({""}))   #endif    });   array(string) package_module_path = ({ });      array(string) package_directories = ({ });      void add_package(string package_dir)   { -  string ver = r_read_bytes(combine_path(package_dir, "VERSION")); +  string real_pkg_dir = lfile_path(package_dir); +  string ver = Stdio.read_bytes(combine_path(real_pkg_dir, "VERSION")); +  if (ver) ver -= "\n";    if (ver && (ver != "")) { -  report_debug("Adding package %s (Version %s).\n", -  roxen_path (package_dir), ver - "\n"); +  if ((ver[0] >= '0') && (ver[0] <= '9')) { +  ver = "Version " + ver; +  } +  report_debug("Adding package %s (%s).\n", +  roxen_path (package_dir), ver);    } else {    report_debug("Adding package %s.\n",    roxen_path (package_dir));    }    package_directories += ({ package_dir }); -  string real_pkg_dir = lfile_path(package_dir); +     string sub_dir = combine_path(real_pkg_dir, "pike-modules");    if (Stdio.is_dir(sub_dir)) {    REPORT_DEBUG(" Pike modules: %O\n", sub_dir);    master()->add_module_path(sub_dir);    }    if (Stdio.is_dir(sub_dir = combine_path(real_pkg_dir, "include/"))) {    REPORT_DEBUG(" Pike includes: %O\n", sub_dir);    master()->add_include_path(sub_dir);    }   #ifdef RUN_SELF_TEST
Roxen.git/server/base_server/roxenloader.pike:2080:    }    }    return file_stat(roxen_path(filename)) && roxen_path(filename);   }      array(string) lget_dir(string path)   {    if (path[0] != '/') {    array(string) res = UNDEFINED;    foreach(package_directories, string dir) { -  array(string) paths = -  get_dir(combine_path(roxen_path(dir), path)); -  if (paths) res += paths; +  dir = combine_path(roxen_path(dir), path); +  array(string) paths = get_dir(dir); +  if (paths) { +  res += paths;    } -  +  }    if (res) return Array.uniq(res);    }    return get_dir(roxen_path(path));   }      // Make a $PATH-style string   string make_path(string ... from)   {    return map(from, lambda(string a, string b) {    return (a[0]=='/')?combine_path("/",a):combine_path(b,a);
Roxen.git/server/base_server/roxenloader.pike:2241:    string dir;    while (stringp(dir = Getopt.find_option(av, ({}), ({ "package" }),    UNDEFINED, 1))) {    add_package(dir);    }      #ifdef RUN_SELF_TEST    // Add all customer packages.    foreach(lget_dir("customers") || ({}), string dir) {    dir = combine_path("customers", dir); -  if (Stdio.is_dir(roxen_path(dir))) { +  if (Stdio.is_dir(lfile_path(dir))) {    add_package(dir);    }    }   #endif       roxen_is_cms = !!lfile_stat("modules/sitebuilder") ||    !!lfile_stat("packages/sitebuilder");       if(roxen_is_cms) {    if (lfile_stat("modules/print") || lfile_stat("packages/print")) {