move-if-change revision 267654
1251538Srpaulo#!/bin/sh 2251538Srpaulo 3251538Srpaulo# Copyright (C) 1996 Free Software Foundation, Inc. 4251538Srpaulo# 5251538Srpaulo# This program is free software; you can redistribute it and/or modify 6251538Srpaulo# it under the terms of the GNU General Public License as published by 7251538Srpaulo# the Free Software Foundation; either version 2 of the License, or 8251538Srpaulo# (at your option) any later version. 9251538Srpaulo# 10251538Srpaulo# This program is distributed in the hope that it will be useful, 11251538Srpaulo# but WITHOUT ANY WARRANTY; without even the implied warranty of 12251538Srpaulo# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13251538Srpaulo# GNU General Public License for more details. 14251538Srpaulo# 15251538Srpaulo# You should have received a copy of the GNU General Public License 16251538Srpaulo# along with this program; if not, write to the Free Software 17251538Srpaulo# Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18251538Srpaulo 19251538Srpauloif 20251538Srpaulotest -r $2 21251538Srpaulothen 22251538Srpauloif 23251538Srpaulocmp $1 $2 > /dev/null 24251538Srpaulothen 25251538Srpauloecho $2 is unchanged 26251538Srpaulorm -f $1 27251538Srpauloelse 28251538Srpaulomv -f $1 $2 29251538Srpaulofi 30251538Srpauloelse 31251538Srpaulomv -f $1 $2 32251538Srpaulofi 33251538Srpaulo