// log recursively all files and directories in src as entries in dest
// dest is created if necessary

void logRecursive(string src, string dest)
{
    list dirs;
    string next;
    int idx;

    chdir(g_cwd);

    if (!exists(src))
    {
        printf("skipping unavailable directory `", src, "'\n");
        return;
    }

    dirs = findAll("d", src, "");     // find all subdirs 

    for (idx = listlen(dirs); idx--; ) // visit all subdirs
    {
        next = "/" + dirs[idx];
        logRecursive(src + next, dest + next);
    }

    logInstall(src, "", dest);
}




