nickbreen / docker-wp-setup

Scripted setup of a WP instance using WP-CLI
GNU General Public License v2.0
3 stars 0 forks source link

Refactor SCM_Command to pure PHP (no shell_exec) #6

Open nickbreen opened 8 years ago

nickbreen commented 8 years ago

I.e.

  static protected function fetch_tarball($url, $auth = NULL) {
    if ($auth)
      $auth = "-u ${auth}";
    // TODO pure PHP
    return shell_exec("echo -n $(readlink -n -f .)/; curl -sfLJO -w '%{filename_effective}' ${auth} ${url}");
  }
nickbreen commented 8 years ago

Rather proc_open or whatever would be better for piping stuff into tar.

nickbreen commented 8 years ago

PharData is the PHP class for manipulating tar's