#!/bin/sh

# 
# This script is executed after the patch has been installed
# Tt does the following:
#   - redeploy the new (patched) version of the messenger resources
#

e_ok=0	       # script completed successfully.
e_fatal=1      # stop installation on this exit
e_warning=2    # Installation will go on. 
e_int=3        # Interrupted. Stop installation
e_reboot=10    # User must reboot after installation of all selected packages
               # To be added to one of the single-digit exit code above
e_rebootnow=20 # User must reboot right after installation of current package
               # To be added to one of the single-digit exit code above

# Name of the messenger resources package
PKG="SUNWiimc"

# Calculate absolute Base directory
if [ "$ROOTDIR" = "" ]
then
  BASEDIR=`/bin/pkgparam $PKG BASEDIR`
else
  BASEDIR=`/bin/pkgparam -R $ROOTDIR $PKG BASEDIR`
  BASEDIR="$ROOTDIR$BASEDIR"
fi

# Redeploy the messenger resources
if [ -f $BASEDIR/SUNWiim/html/redeploy ]
then
  $BASEDIR/SUNWiim/html/redeploy
else
  if [ -f $BASEDIR/SUNWiim/html/redeployApp ]
  then
    $BASEDIR/SUNWiim/html/redeployApp
  fi
fi

exit $e_ok