From 5bc2f642a77010ef3d118dc286b39fa4a7f21699 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 8 May 1998 20:56:30 +0000 Subject: Update. 1998-05-08 21:56 Zack Weinberg * autolock.sh: Removed. * manual/move-if-change: Removed. * scripts: new directory. * =__ify: moved to scripts. * config.guess: Likewise. * config.sub: Likewise. * gen-FAQ.pl: Likewise. * install-sh: Likewise. * mkinstalldirs: Likewise. * move-if-change: Likewise. * printsources: Likewise. * rellns.sh: Likewise. * test-installation.pl: Likewise. * configure.in: Look in scripts for config.guess, config.sub, install-sh. * Makefile: Distribute all above files in their new home. Find gen-FAQ.pl and test-installation.pl in scripts. * manual/Makefile: Find mkinstalldirs and move-if-change in $(..)scripts. Drop them from distribute. Minor cleanups. * Makerules: Find mkinstalldirs and rellns-sh in scripts. * sysdeps/mach/hurd/Makefile: Find move-if-change in scripts. * timezone/Makefile: Find rellns-sh in scripts. --- scripts/move-if-change | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 scripts/move-if-change (limited to 'scripts/move-if-change') diff --git a/scripts/move-if-change b/scripts/move-if-change new file mode 100755 index 0000000000..66d8b8adc7 --- /dev/null +++ b/scripts/move-if-change @@ -0,0 +1,17 @@ +#!/bin/sh +# Like mv $1 $2, but if the files are the same, just delete $1. +# Status is 0 if $2 is changed, 1 otherwise. +if +test -r $2 +then +if +cmp -s $1 $2 +then +echo $2 is unchanged +rm -f $1 +else +mv -f $1 $2 +fi +else +mv -f $1 $2 +fi -- cgit 1.4.1