--- - branch: MAIN date: Thu Apr 23 19:06:09 UTC 2020 files: - new: '1.81' old: '1.80' path: pkgsrc/mk/subst.mk pathrev: pkgsrc/mk/subst.mk@1.81 type: modified id: 20200423T190609Z.2c78ec30f8a25af6c519f7e3e9fe6e03f7c9c00a log: | mk/subst.mk: refactor main code The indentation of the inner loop has been fixed. The chmod is only run if the file has actually changed. In the other case, the file would have been removed right after the chmod, which made the chmod unnecessary. For compatibility with ancient operating systems whose /bin/sh still does not understand negated conditions (SunOS), these conditions have been avoided and were written using && and || instead. The inner loop has been flattened a bit, to compensate for the indentation of the outer loop. module: pkgsrc subject: 'CVS commit: pkgsrc/mk' unixtime: '1587668769' user: rillig