]> git.saurik.com Git - bison.git/blame - config/move-if-change
(yysigned_char): New type.
[bison.git] / config / move-if-change
CommitLineData
d074a105
AD
1#!/bin/sh
2# Like mv $1 $2, but if the files are the same, just delete $1.
3# Status is 0 if $2 is changed, 1 otherwise.
4if
5test -r $2
6then
7if
8cmp -s $1 $2
9then
10echo $2 is unchanged
11rm -f $1
12else
13mv -f $1 $2
14fi
15else
16mv -f $1 $2
17fi