head     36.1;
branch   ;
access   ;
symbols  ;
locks    kevin:36.1; strict;
comment  @*   @;


36.1
date     89.06.08.10.00.54;  author kodiak;  state Exp;
branches ;
next     36.0;

36.0
date     89.04.18.17.55.51;  author kodiak;  state Exp;
branches ;
next     ;


desc
@@


36.1
log
@remove $Header$ stripping
@
text
@#! /bin/csh -f
#
#	mminstall [-s <strip-destdir>] <destdir> <files>
#
if ($#argv > 1) then
    if ("$argv[1]" == "-s") then
	shift argv
	set sdir=$argv[1]
	shift argv
	if ($#argv > 1) then
	    if ("$cwd" == "$1") then
		echo "mminstall: ERROR!  Cannot install to self ($1)"
		exit 0
	    endif
	    if ("$cwd" == "$sdir") then
		echo "mminstall: ERROR!  Cannot install to self ($sdir)"
		exit 0
	    endif
	    if (! -e $sdir) then
		echo "mminstall: mkdir $sdir"
		mkdir $sdir
	    endif
	    foreach file ($argv[2-])
		if (-e $file) then
		    cmp -s $1/$file $file
		    if ($status) then
			/bin/rm -f $1/$file
			mv $file $1/$file
			echo "mminstall: $1/$file"
		    endif
		    stripc $file /tmp/tmp$$
		    cmp -s $sdir/$file /tmp/tmp$$
		    if ($status) then
			/bin/rm -f $sdir/$file
			cp /tmp/tmp$$ $sdir/$file
			echo "mminstall: $sdir/$file"
		    endif
		endif
	    end
	endif
    else
	if (! -e $1) then
	    echo "mminstall: mkdir $1"
	    mkdir $1
	endif
	if ("$cwd" == "$1") then
	    echo "mminstall: ERROR!  Cannot install to self ($1)"
	    exit 0
	endif
	foreach file ($argv[2-])
	    if (-e $file) then
		cmp -s $1/$file $file
		if ($status) then
		    /bin/rm -f $1/$file
		    cp $file $1/$file
		    echo "mminstall: $1/$file"
		endif
	    endif
	end
    endif
    /bin/rm -f /tmp/tmp$$
endif

exit 0
@


36.0
log
@*** empty log message ***
@
text
@d25 1
a25 2
		    grep -v '$Header' $file >/tmp/tmp$$
		    cmp -s $1/$file /tmp/tmp$$
d28 1
a28 1
			cp /tmp/tmp$$ $1/$file
d61 1
a61 1
    rm -f /tmp/tmp$$
@
