]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgo/mvifdiff.sh
re PR go/90614 (gcc-9.1.0/libgo/go/syscall/wait.c:54:22: error: unused parameter...
[thirdparty/gcc.git] / libgo / mvifdiff.sh
CommitLineData
4368bc45
ILT
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
11if cmp -s "$1" "$2" ; then
12 rm "$1"
13else
14 mv "$1" "$2"
15fi