Last change
on this file since 613 was
569,
checked in by Peter Johansson, 16 years ago
|
NOTE: may cause file name clash. Adding file
subversion_info.h'. Previously make' generated this file, and thus
you may experience a file name clash. Please remove subversion_info.h
prior updating.
Moved implementation of subversion_info to source file in order to
avoid re-compilations not needed. Using script move-if-change to
create source file.
|
-
Property svn:executable set to
*
|
File size:
384 bytes
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # Like mv $1 $2, but if the files are the same, just delete $1. |
---|
3 | # Status is zero if successful, nonzero otherwise. |
---|
4 | |
---|
5 | usage="$0: usage: $0 SOURCE DEST" |
---|
6 | |
---|
7 | case $# in |
---|
8 | 2) ;; |
---|
9 | *) echo "$usage" >&2; exit 1;; |
---|
10 | esac |
---|
11 | |
---|
12 | for arg in "$1" "$2"; do |
---|
13 | case $arg in |
---|
14 | -*) echo "$usage" >&2; exit 1;; |
---|
15 | esac |
---|
16 | done |
---|
17 | |
---|
18 | if test -r "$2" && cmp -s "$1" "$2"; then |
---|
19 | rm -f "$1" |
---|
20 | else |
---|
21 | mv -f "$1" "$2" |
---|
22 | fi |
---|
Note: See
TracBrowser
for help on using the repository browser.