public static function installJSDependencies($event) {
        echo "Installing JS Library dependencies for the AltamiraBundle\n";
        $dir = getcwd();

        ScriptHandler::gitSubmodulesUpdate();
        ScriptHandler::cleanPublicJSDir();


        // discovered that assetic can minify all the code - all not necessary anymore.
        /*
        echo "Compiling jqplot\n";
        chdir(static::getLibsDir().DIRECTORY_SEPARATOR."jqplot");
        exec('ant clean min', $output, $status);
        if ($status) {
            die("Ant failed with $status (is ant installed?)\n");
        }
        chdir($dir);

        echo "Compiling flot\n";
        $flotLib=static::getLibsDir() .DIRECTORY_SEPARATOR."flot";
        if (($files = scandir($flotLib)) ===false ) {
            die("failed to traverse through flot directory");
        }
        foreach ($files as $file) {
            if (substr($file,-3) == ".js") {
                exec(static::getYUIBin(). " ".escapeshellarg($flotLib.DIRECTORY_SEPARATOR.$file)." -o "
                    .escapeshellarg(static::getLibsDir().DIRECTORY_SEPARATOR."flot".DIRECTORY_SEPARATOR.substr($file,0,-2)."min.js"));
            }
        }

        echo "Compiling flot bubbles\n";
        $flotBubblesLib=static::getLibsDir() .DIRECTORY_SEPARATOR."flot-bubbles";
        if (($files = scandir($flotBubblesLib)) ===false ) {
            die("failed to traverse through flot bubbles directory");
        }

        foreach ($files as $file) {
            if (substr($file,-3) == ".js") {
                // minification did not work out, so commented min code.
                // exec(static::getYUIBin(). " ".escapeshellarg($flotBubblesLib.DIRECTORY_SEPARATOR.$file) ." -o "
                //    .escapeshellarg(static::getLibsDir().DIRECTORY_SEPARATOR."flot-bubbles".DIRECTORY_SEPARATOR.substr($file,0,-2)."min.js"));

                // straight copy to min.js for compatibility with min setting in altamira
                copy($flotBubblesLib.DIRECTORY_SEPARATOR.$file,static::getLibsDir().DIRECTORY_SEPARATOR."flot-bubbles".DIRECTORY_SEPARATOR.substr($file,0,-2)."min.js");
            }
        }*/

        echo "Installing jqplot\n";
        mkdir(static::getJSDir().DIRECTORY_SEPARATOR."jqplot",0777,true);
        $source = static::getLibsDir().DIRECTORY_SEPARATOR."jqplot".DIRECTORY_SEPARATOR."src";
        $dest= static::getJSDir().DIRECTORY_SEPARATOR."jqplot";
        recursiveAssetsOnlyCopy($source,$dest);



        echo "Installing flot\n";
        mkdir(static::getJSDir().DIRECTORY_SEPARATOR."flot",0777,true);
        recursiveAssetsOnlyCopy(static::getLibsDir().DIRECTORY_SEPARATOR."flot",static::getJSDir().DIRECTORY_SEPARATOR."flot");


        echo "Installing flot-bubbles\n";
        mkdir(static::getJSDir().DIRECTORY_SEPARATOR."flot-bubbles",0777,true);
        recursiveAssetsOnlyCopy(static::getLibsDir().DIRECTORY_SEPARATOR."flot-bubbles",static::getJSDir().DIRECTORY_SEPARATOR."flot-bubbles");
    }