#!/bin/sh
#
# Set command search path
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec; export PATH

echo ""
echo "WebObjects 5.3.3 Installer: WebObjectsRuntime Package Post Install script running:" `date`

if [ $3 = / ]; then
 NEXT_ROOT="$3"
else
 NEXT_ROOT="$3/"
fi

if [ "" = "$WO_DOCUMENT_ROOT" ]; then
  WO_DOCUMENT_ROOT="${NEXT_ROOT}Library/WebServer/Documents"
fi

# Set up some convenience variables
woroot="${NEXT_ROOT}System/Library/WebObjects"
wodocroot="${woroot}/WODocumentRoot"

################################################################

# Copy over the contents of WODocumentRoot into the chosen document root
echo Copying the contents of WODocumentRoot to $WO_DOCUMENT_ROOT ...
/usr/bin/ditto $wodocroot $WO_DOCUMENT_ROOT

################################################################
