#!/bin/csh -f

set old		= 0
set file	= ximtool.gui

old:

echo -n "Building $file ..."
if ($old == 0) then
    cat main.obj		> $file
else
    cat main-old.obj		> $file
endif
cat panel.obj			>> $file
cat param.obj			>> $file
cat help.obj			>> $file
cat blink.obj			>> $file
cat hdr.obj			>> $file
cat pixtab.obj			>> $file
cat tcl.obj			>> $file
cat warn.obj			>> $file

cat global.res			>> $file
if ($old == 0) then
    cat main.res		>> $file
else
    cat main-old.res		>> $file
endif
cat panel.res			>> $file
cat display.res			>> $file
cat print.res			>> $file
cat info.res			>> $file
cat load.res			>> $file
cat save.res			>> $file
cat tile.res			>> $file
cat wcs.res			>> $file
cat blink.res			>> $file
cat hdr.res			>> $file
cat pixtab.res			>> $file
cat help.res			>> $file
cat tcl.res			>> $file
cat warn.res			>> $file
cat resources.res		>> $file

cat boot.tcl			>> $file
cat global.tcl			>> $file
cat plots.tcl			>> $file
cat imagewin.tcl		>> $file
cat func.tcl			>> $file
cat panel.tcl			>> $file
cat magnifier.tcl		>> $file
cat panner.tcl			>> $file
cat print.tcl			>> $file
cat info.tcl			>> $file
cat load.tcl			>> $file
cat save.tcl			>> $file
cat tile.tcl			>> $file
cat wcs.tcl			>> $file
cat compass.tcl			>> $file
cat rulers.tcl			>> $file
cat help.tcl			>> $file
cat hdr.tcl			>> $file
cat pixtab.tcl			>> $file
cat warn.tcl			>> $file
cat tcl.tcl			>> $file
cat ism.tcl			>> $file
if ($old == 0) then
    cat toolbars.tcl		>> $file
endif

echo "Done"

if ($old == 0) then
    set old	= 1
    set file	= ximtool-old.gui
    goto old
endif

echo -n "Installing files ..."
mv *.gui ../
echo "Done"
