Skip to content

Commit

Permalink
new (for src/library/*/src/Makefile)
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@5160 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
maechler committed Jul 14, 1999
1 parent 8975661 commit 060a70f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tools/copy-if-change
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
#
# Like cp $1 $2, but if the files are the same, do NOTHING.
# Status is 0 if $2 is changed, 1 otherwise.

if test -r $2; then
if cmp $1 $2 > /dev/null; then
echo $2 is unchanged
else
cp -f $1 $2
fi
else
cp $1 $2
fi

0 comments on commit 060a70f

Please sign in to comment.