diff options
author | obrien <obrien@FreeBSD.org> | 2002-12-04 15:15:07 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2002-12-04 15:15:07 +0000 |
commit | 91f47f293a334517686a4f9330706abaa13430e5 (patch) | |
tree | 2d28fafa58d5258a639ec5d19c9c05bc40a6ccda /contrib/gcc/config/mpw/MoveIfChange | |
parent | 3863f249f2b86c3c411f8cf5a17558af9c08e742 (diff) | |
parent | ef3bb1318428b8cfb1c8287f61b9b1f23f9bf0b5 (diff) | |
download | FreeBSD-src-91f47f293a334517686a4f9330706abaa13430e5.zip FreeBSD-src-91f47f293a334517686a4f9330706abaa13430e5.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r107588,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/gcc/config/mpw/MoveIfChange')
-rw-r--r-- | contrib/gcc/config/mpw/MoveIfChange | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/contrib/gcc/config/mpw/MoveIfChange b/contrib/gcc/config/mpw/MoveIfChange new file mode 100644 index 0000000..0dbc125 --- /dev/null +++ b/contrib/gcc/config/mpw/MoveIfChange @@ -0,0 +1,19 @@ +# Rename a file only if it is different from a previously existing +# file of the same name. This is useful for keeping make from doing +# too much work if the contents of a file haven't changed. + +# This is an MPW translation of the standard GNU sh script move-if-change. + +Set exit 0 + +If "`exists -f "{2}"`" + Compare "{1}" "{2}" >dev:null + If {status} != 0 + Rename -y "{1}" "{2}" + Else + Echo "{2}" is unchanged + Delete -i -y "{1}" + End +Else + Rename -y "{1}" "{2}" +End |