Mercurial > hg > CbC > CbC_gcc
annotate libgo/mvifdiff.sh @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 #!/bin/sh |
2 | |
3 # Copyright 2014 The Go Authors. All rights reserved. | |
4 # Use of this source code is governed by a BSD-style | |
5 # license that can be found in the LICENSE file. | |
6 | |
7 # The mvifdiff.sh script works like the mv(1) command, except | |
8 # that it does not touch the destination file if its contents | |
9 # are the same as the source file. | |
10 | |
11 if cmp -s "$1" "$2" ; then | |
12 rm "$1" | |
13 else | |
14 mv "$1" "$2" | |
15 fi |