Closed marcochiesi closed 8 years ago
Thanks @marcochiesi , I'll be testing this later this week and will then make a release.
@marcochiesi Sorry, I never did get to testing and releasing your changes. I'm currently re-factoring the plug-in, and have included most of your changes, so I'm going to close this.
Thanks again for the PR.
I had to revert the change using --no-run-if-empty
as this is not supported on OSX.
This pull request includes the following changes:
exec
calls have been rewritten using an internal function that executes commands synchronously usingexecSync
cd
commands have been rewritten using thecwd
optionawk
command is replaced bygawk
on Windows platforms (still usingawk
elsewhere)grep
, and adding the--no-run-if-empty
parameter toxargs
. I.e.svn status | grep -v '^.[ \t]*\\..*' | grep '^?' | awk '{print $2}' | xargs svn add
becamesvn status | gawk '/^[?]/{print $2}' | xargs --no-run-if-empty svn add
These modifications have been tested on a Win7 machine, with svn and Git command line tools, which include the
gawk
command natively (no need to install it explicitely). Git command line tools are provided both by the official Github client and by the Atlassian Sourcetree client.Everything should be still running fine on *nix platforms, but it would be better to take some more tests.
As for the SVN server-side it has been tested on official WordPress SVN repo and also on a private SVN repo on Assembla.com.
Note: this should fix issues #14 and #2