OSDN Git Service

Use `cp -r` instead of `mv` for moving WP files into the current dir
authorscribu <mail@scribu.net>
Sun, 10 Feb 2013 15:35:17 +0000 (17:35 +0200)
committerscribu <mail@scribu.net>
Sun, 10 Feb 2013 15:38:30 +0000 (17:38 +0200)
This allows installing WP into a directory that already has a wp-content
dir.

Props @carlalexander. Closes #293

php/commands/core.php

index ac9600e..dc1f2db 100644 (file)
@@ -37,7 +37,7 @@ class Core_Command extends WP_CLI_Command {
                $silent = WP_CLI::get_config('quiet') ? ' --silent ' : ' ';
 
                WP_CLI::launch( 'curl -f' . $silent . escapeshellarg( $download_url ) . ' | tar xz' );
-               WP_CLI::launch( 'mv wordpress/* . && rm -rf wordpress' );
+               WP_CLI::launch( 'cp -r wordpress/* . && rm -rf wordpress' );
 
                WP_CLI::success( 'WordPress downloaded.' );
        }