CCL Home Page
Up Directory CCL my_cp
#! /bin/sh
############################################################################
# $RCSfile: my_cp,v $
# $Revision: 1.2 $
# $Date: 1996/05/28 19:20:48 $
############################################################################

# my_cp; shenkin, nov95.  Designed to overcome a bug in HP make.
#  if DIR1 and DIR2 are the same, do nothing.
#  if they are different, copy FNAME from DIR1 to DIR2.
DIR1=$1
DIR2=$2
FNAME=$3
INODE_DIR1=`ls -id $DIR1 | awk '{print $1}'`
INODE_DIR2=`ls -id $DIR2 | awk '{print $1}'`
if test $INODE_DIR1 -eq $INODE_DIR2 ; then
	echo > /dev/null
else
	cp $DIR1/$FNAME $DIR2
fi
Modified: Tue May 28 19:21:07 1996 GMT
Page accessed 4377 times since Sat Apr 17 21:58:00 1999 GMT