philip / MySQLConverterTool

A MySQL Converter Tool
314 stars 144 forks source link

Default use of directory recursion, problems with backup/overwrite #29

Open Mabu2 opened 5 years ago

Mabu2 commented 5 years ago

Using the -d parameter with the cli.php command line interface, causes recursive conversion of nested subdirectories.

(this doesn't appear to be mentioned in any documentation and can be quite a shock to anybody who wanted to test the conversion within a small scope - I ran this in what I thought was a sandbox and it crawled symlinks and damaged production code)

There should be an option to enable/disable directory recursion, and allow use of a single directory. (NOTE that you cannot apparently specify a directory via the -p command, that seems to take filespecs only)

I recommend the addition of the following extra commands:

Mabu2 commented 5 years ago

by the way, other than that.. really like the script! Excellent work!

bannostookaylo commented 5 years ago

where you able to use the -d param and the files saved/updated? If so would you mind showing me what you did? Here is my command and it seems to run but the files never update

php cli.php -d /path/to/dir -p "*.php"
bannostookaylo commented 5 years ago

Nevermind looks like I missed the -u flag here is my final command incase anyone else runs across this

php cli.php -d /path/to/dir -p "*.php" -u -q