Fix a subtle proguard incremental build error

Prevent a confusing incremental build failure where proguard would
read and write to the same file accidentally, failing hard. Can
happen after switching the build from not using proguard, where the
output jar is a gn-copy hardlink to the input jar, to using proguard,
where the output is written to by a script reading from the input jar.

Fix by checking if the output is not a hardlink to the input in the
wrapper script.

NB. The build normally uses proguard on an apk, but makes it possible
to try and only proguard a single jar, and the bug potentially only
happens in this case.

Review-Url: https://codereview.chromium.org/2485663003
Cr-Commit-Position: refs/heads/master@{#430890}
1 file changed