#!/bin/csh -f
# Eric A. Brewer
# 2-24-92
# Version 3.0

# This script is for installing a copy of Proteus into a directory,
# given that a copy of Proteus is already at the site.  It is not
# for installing Proteus at a new site.

# The script takes one argument, which is the target directory.
# Before it can be used, the variable default_dir must
# be set to the location of the engine subdirectory (NOT the top level
# directory)

# set defaultporot_dir to be the master version of the engine subdirectory
# (not the master top-level directory!)
set default_dir = /u/dfk/research/parallel/proteus/current/engine

if ($?SIMDIR) then
    set src = $SIMDIR
else
    set src = $default_dir
endif

if ($src == UNDEFINED) then
	echo "This csh script must be edited: please define the default_dir variable"
	exit(1)
endif

if ($#argv != 1) then
     echo "Usage: install-proteus <target directory>"
     exit(1)
endif

set target = "$1"

mkdir $target
ln -s {$src}/*.h $target/
cp -i {$src}/*.param $target/
cp -i {$src}/SimMake $target/
cp -i {$src}/UserMake $target/
ln -s {$src}/*.ca $target/
ln -s {$src}/*.c $target/
ln -s {$src}/*.S $target/
ln -s {$src}/mk_* $target/
ln -s {$src}/gdb-macros $target/
cp -i {$src}/ParamHelp {$src}/Configfile {$src}/Graphfile $target/
