Пример #1
0
    //$phpfile = $argv[0];
    //echo $phpfile;
    //echo PHP_EOL;
    $theme = $argv[1];
    $version = $argv[2];
    $filename = "{$theme} {$version}.zip";
    echo "creating {$filename}";
    echo PHP_EOL;
    //$sd = chdir( "\apache\htdocs\wordpress\wp-content\themes" );
    //echo $sd;
    cd2themes();
    echo PHP_EOL;
    // $cd = chdir( $theme );
    dosetversion($theme, $version);
    docontinue("{$theme} {$version}");
    doreadmemd($theme);
    do7zip($theme, $filename);
}
/**
 * 
 C:\apache\htdocs\wordpress\wp-content>"C:\Program Files (x86)\7-Zip\7z.exe"

7-Zip 4.65  Copyright (c) 1999-2009 Igor Pavlov  2009-02-03

Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...]
       [<@listfiles...>]

<Commands>
  a: Add files to archive
  b: Benchmark
  d: Delete files from archive
Пример #2
0
    //echo $phpfile;
    //echo PHP_EOL;
    $plugin = $argv[1];
    $version = $argv[2];
    $lang = bw_array_get($argv, 3, null);
    $filename = "{$plugin} {$version}.zip";
    echo "Creating {$filename}";
    echo PHP_EOL;
    cd2plugins();
    //dogitarchive( $plugin, $filename );
    //docontinue( "After creating git archive: $plugin $version" );
    doreadmetxt($plugin);
    dosetversion($plugin, $version);
    docontinue("{$plugin} {$version}");
    doassets($plugin);
    doreadmemd($plugin);
    // We need to find a good time to decide when to do this
    // First we need to ensure that there really is a string change
    // which means a better comparison of the .pot files
    //
    if ($lang) {
        dol10n($plugin, $lang);
        // Should be after doreadmemd()
    }
    dolibs($plugin);
    docontinue("{$plugin} {$version}");
    doadminactivation($plugin);
    //dolibs( $plugin );
    do7zip($plugin, $filename);
    //dogitarchive( $plugin, $filename );
}