#! /bin/sh
# @(#)INSTALL version 3.7 created 6/18/96
# @(#)Copyright (c), 1987, 1996 StatSci, Inc.  All rights reserved.
#
# This is the module-specific INSTALL script for the S+SpatialStats module.
# This script will usually be run during the execution of the command:
#       Splus MODINSTALL spatial

SHOME=`Splus SHOME`
if [ X$SHOME = X ]; then
  echo "Could not run 'Splus SHOME', S-PLUS is not properly"
  echo "installed on this system"
  exit 1
fi
export SHOME

PLATFORM=`Splus PLATFORM`
if [ X$PLATFORM = X ]; then
  echo "Could not run 'Splus PLATFORM'"
  exit 1
fi

if [ $PLATFORM = DECSTATION ]; then
  echo "S+SpatialStats will not be released for the DECstation"
  exit 1
fi

if [ $PLATFORM = OSF1_DECALPHA ]; then
# Move Little Endian .Data for SpatialStats in place:
  mv $SHOME/module/spatial/.Data/.Help $SHOME/module/spatial/.Data.little.end/.Help
  rm -rf $SHOME/module/spatial/.Data
  mv $SHOME/module/spatial/.Data.little.end $SHOME/module/spatial/.Data
else
# Remove Little Endian .Data, not needed for this platform:
  rm -rf $SHOME/module/spatial/.Data.little.end
fi

echo "Adding S+SpatialStats keywords to the S-PLUS online help system."
$SHOME/cmd/ADDKEYWORD geostat 'Geostatistical Data Analysis'
$SHOME/cmd/ADDKEYWORD hexbin 'Hexagonal Binning'
$SHOME/cmd/ADDKEYWORD lattice 'Lattice Data Analysis'
$SHOME/cmd/ADDKEYWORD pointpattern 'Point Pattern Analysis'
$SHOME/cmd/ADDKEYWORD spatialreg 'Spatial Regression'
$SHOME/cmd/ADDKEYWORD spatialstats 'Spatial Statistics Module'
