diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-04-22 10:21:45 +0000 |
---|---|---|
committer | <> | 2015-04-25 21:44:09 +0000 |
commit | f80b5ea1605c9f9408c5aa386ba71c16d918ebbf (patch) | |
tree | bb7eafaa81fc4b8c5c215bc08d517fd158db234a /libgo/mvifdiff.sh | |
parent | c27a97d04853380f1e80525391b3f0d156ed4c84 (diff) | |
download | gcc-tarball-f80b5ea1605c9f9408c5aa386ba71c16d918ebbf.tar.gz |
Imported from /home/lorry/working-area/delta_gcc-tarball/gcc-5.1.0.tar.bz2.gcc-5.1.0
Diffstat (limited to 'libgo/mvifdiff.sh')
-rw-r--r-- | libgo/mvifdiff.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libgo/mvifdiff.sh b/libgo/mvifdiff.sh new file mode 100644 index 0000000000..6706e40de4 --- /dev/null +++ b/libgo/mvifdiff.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Copyright 2014 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +# 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 |