annotate libgo/mvifdiff.sh @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 #!/bin/sh
kono
parents:
diff changeset
2
kono
parents:
diff changeset
3 # Copyright 2014 The Go Authors. All rights reserved.
kono
parents:
diff changeset
4 # Use of this source code is governed by a BSD-style
kono
parents:
diff changeset
5 # license that can be found in the LICENSE file.
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 # The mvifdiff.sh script works like the mv(1) command, except
kono
parents:
diff changeset
8 # that it does not touch the destination file if its contents
kono
parents:
diff changeset
9 # are the same as the source file.
kono
parents:
diff changeset
10
kono
parents:
diff changeset
11 if cmp -s "$1" "$2" ; then
kono
parents:
diff changeset
12 rm "$1"
kono
parents:
diff changeset
13 else
kono
parents:
diff changeset
14 mv "$1" "$2"
kono
parents:
diff changeset
15 fi