Ejemplo n.º 1
0
        freepbx::out("Module " . $module . " will not be tagged!");
        continue;
    }
    freepbx::out("Done");
    //Package javascript because Andrew always forgets
    if ($module == 'framework') {
        freepbx::outn("\tFramework, packaging javascripts...");
        exec('/usr/bin/env php ' . dirname(__FILE__) . '/pack_javascripts.php --directory ' . $vars['directory']);
        freepbx::out("Done");
    }
    //If we have a license, which we are required to have by this point, get the
    //	licenselink tag and generate a LICENSE file
    if ($license) {
        if (!empty($licenselink)) {
            freepbx::outn("\tAttempting to get license from: " . $licenselink);
            $licensetext = freepbx::get_license_from_link($licenselink);
            if ($licensetext === false) {
                freepbx::out('Unable to add license text');
                continue;
            }
            if (!file_put_contents($mod_dir . '/LICENSE', $licensetext)) {
                freepbx::out('Unable to get License from License link in module.xml');
                continue;
            }
            freepbx::out("Done");
        }
    }
    $description = isset($modulexml['description']) ? $modulexml['description'] : '';
    $reps = array('!!NAME!!' => $rawname, '!!DESCRIPTION!!' => $description, '!!LICENSE!!' => $license, '!!LICENSELINK!!' => $licenselink);
    $template = <<<HERE
```