Closed mandresm closed 4 years ago
Might it be sensible to check the creation time?
Might it be sensible to check the creation time?
If rm -f echam-6.3.04p1/bin/echam6
is already in the command_list
doesn't it mean that the user is already trying to clean it, and that at the time of the copying, the binary won't exist anyway in the echam-6.3.04p1/bin
folder?
Why would we then need to check the creation time?
This solves a problem in issue esm-tools/esm_tools#77.
Recompilation of ECHAM was successful, but if a binary existed in the bin folder (i.e.
echam-6.3.04p1/bin/echam6
), the following lines will find it out and avoid entering in theif
that builds the command for copying the binary from thesrc
to thebin
folder:This was solved by checking if there is already a
rm -f
command in thecommand_list
and, if that exists, it means that thetoplevel_bin_path
file is going to be deleted and and theif
that copies the binary is allowed.