void runP(int testValue, string cmd)
{
    system(testValue, cmd);
}

void run(string cmd)
{
    runP(0, cmd);
}

void md(string target)
{
    int idx;
    list paths;
    string file;

    paths = strtok(target, " ");

    for (idx = sizeof(paths); idx--; )
    {
        file = element(idx, paths);
        if (!exists(file))
            run("mkdir -p " + file);
    }
}

