sindresorhus / cpy-cli

Copy files
MIT License
344 stars 33 forks source link

Enhancement: Copy if newer option #13

Open JamesCoyle opened 6 years ago

JamesCoyle commented 6 years ago

Would be helpful to have an option to only replace the destination if the source is different/newer.

sindresorhus commented 5 years ago

Agreed, that would be useful. Should be implemented in cpy first though.

For anyone that wants to implement this, see https://github.com/shelljs/shelljs#cpoptions-source_array-dest for inspiration.