#	Convert Bourne or Korn shell scripts to Hamilton C shell scripts

#	Copyright (c) 1992-1994 by Hamilton Laboratories.  All rights reserved.

#	Documentation of the technique is in the same sh_2_csh subdirectory
#	with the sed scripts.

local seddir, stageone

set seddir = $scriptname:h\sh_2_csh
if (! -e $seddir || ! -D $seddir) then
	echo -2 "sh_2_csh:  Couldn't find the sed scripts."
	exit 1
end
if ($#argv) then
	set stageone = expr.sed $argv:gf
else
	set stageone = expr.sed
end

cd +c $seddir
sed -f $stageone | sed -f if.sed | sed -f proc.sed | sed -f case.sed | sed -f loop.sed | sed -f misc.sed | sed -f expr2.sed | sed -f quotes.sed
