#! /bin/csh -f
#
# Copyright 10/10/96 Sun Microsystems, Inc. All Rights Reserved
#
# @(#)frame-delget	1.3	96/10/10 SMI

#	frame-delget: 
#		check in a .mif file that's been edited as a .frame file.
#
# THIS SAMPLE PROGRAM IS BEING PROVIDED "AS IS" AND ONLY AS A COURTESY TO
# THE RECIPIENT.  SUN MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESS 
# OR IMPLIED WITH RESPECT TO THIS SAMPLE PROGRAM INCLUDING QUALITY, PERF- 
# FORMANCE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON- 
# INFRINGEMENT.  IN NO EVENT WILL SUN BE LIABLE FOR ANY DIRECT, INDIRECT,  
# SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR  
# INABILITY TO USE THIS SAMPLE PROGRAM.

set my_name = `basename $0`

if ( $#argv < 1 ) then
    echo "usage: ${my_name} file[.frame] ..."
    exit 1
endif

foreach arg ( ${argv} )
	if ( ${arg:e} == ".mif" ) then
		set frame = ${arg:r}.frame
		set mif = $arg
	else
		set frame = $arg
		set mif = ${arg:r}.mif
	endif

	frametomif $frame
	tidy-mif $mif
	sccs delget $mif
	miftoframe -locked -o $frame $mif
	chmod -w $frame
end


