diff options
Diffstat (limited to 'llgo/third_party/gofrontend/move-if-change')
| -rwxr-xr-x | llgo/third_party/gofrontend/move-if-change | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llgo/third_party/gofrontend/move-if-change b/llgo/third_party/gofrontend/move-if-change new file mode 100755 index 00000000000..1b8bac6a389 --- /dev/null +++ b/llgo/third_party/gofrontend/move-if-change @@ -0,0 +1,14 @@ +#!/bin/sh + +# This file is distributed under the University of Illinois Open Source +# License. See LICENSE.TXT for details. + +# The mvifdiff.sh script works like the mv(1) command, except +# that it does not touch the destination file if its contents +# are the same as the source file. + +if cmp -s "$1" "$2" ; then + rm "$1" +else + mv "$1" "$2" +fi |

