Closed kba closed 4 years ago
* `ocrd-make -c|-cleanup|-cleanup|cleanup` to remove the Makefiles linked/copies to `$PWD`
That's a good idea. So is the implementation!
* Add a guard against overwriting existing files. Without such a check, calling the script twice (e.g. to see the `--help`) will result in the `ln -s` failiing and `cp -fu` subsequently complaining that source and origin of file to copy are identical
Complaining yes, but that can be ignored (it's just stupid of cp
to show an error and non-zero retvalue when -u
has been requested; this was also fixed in most recent GNU coreutils BTW, so I was hoping to just sit this one out).
But I gather you're really after the complaint – and I admits it's confusing.
Still, that's no good reason to abandon the update semantics (cp -u
). The reason for this was that after running in some target directory, subsequent updates to workflow-configuration
/ make install
will need to also update the copied makefiles in the target directory next time.
subsequent updates to workflow-configuration / make install will need to also update the copied makefiles in the target directory next time.
That's a good point. I've added -nt
(newer-than) check to copy/symlink if makefiles were updated.
Two changes:
ocrd-make -c|-cleanup|-cleanup|cleanup
to remove the Makefiles linked/copies to$PWD
--help
) will result in theln -s
failiing andcp -f
subsequently complaining that source and origin of file to copy are identical