Akelos Framework v1 forum archive. This forum is no longer maintained. To report bugs please visit https://github.com/akelos/akelos/issues
    • CommentAuthorsuperk
     
    On revision 460 (see below), I had a problem when running the setup for a new project, in which the setup would try to create the directory named <project_name>/<project_name> e.g.

    [ akelos $] ./akelos TEST
    ...
    Creating directory /home/user/akelos/TEST/TEST

    There where some errors during the installation process:

    * Can't create directory: /home/user/akelos/TEST

    I fixed the problem when I added a test to see whether the $path already includes the destination directory name:
    function _getDestinationPath($path)
    {
    if (!strstr ($path, $this->options['directory'])) {
    $res = str_replace($this->options['source'], $this->options['directory'], $path); }
    else { $res = $path; }
    return $res;
    }


    Here's the diff
    Index: script/setup
    ===================================================================
    --- script/setup (revision 460)
    +++ script/setup (working copy)
    @@ -232,7 +232,10 @@
    */
    function _getDestinationPath($path)
    {
    - return str_replace($this->options['source'], $this->options['directory'], $path);
    + if (!strstr ($path, $this->options['directory'])) {
    + $res = str_replace($this->options['source'], $this->options['directory'], $path); }
    + else { $res = $path; }
    + return $res;
    }

    /**
    • CommentAuthorKaste
     

    try using

     akelos -h
     script/setup -h
    

    to get some help.

    script/setup -d path/to/destiny
    

    should work as expected.

    Otherwise if you still feel you have found a bug, please ticketize it, and send in your patch/diff.