#! /usr/bin/ksh93
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)install-sfw 1.2 09/06/30 SMI"
#
set -o errexit
MANDIR="${ROOT}/usr/share/man"
BINDIR="${ROOT}/usr/bin"
JARDIR="${ROOT}/usr/share/lib/java"
JAVADOCDIR="${ROOT}/usr/share/lib/java/javadoc/beanshell"
DOCDIR="${ROOT}/usr/share/doc/beanshell"
DEMODIR="${ROOT}/usr/demo/bsh/webapps"
source ${SRC}/tools/install.subr
install_dir()
{
my_dir=$1
my_targ=$2
my_dir_perm=$3
my_file_perm=$4
cp -r $my_dir/* $my_targ
#change permission
find $my_targ -type d -exec chmod $my_dir_perm {} \;
find $my_targ -type f -exec chmod $my_file_perm {} \;
}
TOP=$(pwd)
# install man page
_install N sunman/beansh.1 ${MANDIR}/man1/beansh.1 444
_install N sunman/beanshell.1 ${MANDIR}/man1/beanshell.1 444
cd ${TOP}/${VERS}/scripts
# Install bin script
_install S bsh ${BINDIR}/beansh 555
_install L ./beansh ${BINDIR}/beanshell
cd ${TOP}/${VERS}/dist
# Install binaries
_install N bsh-2.0b4.jar ${JARDIR}/bsh-2.0b4.jar 444
_install N bsh-bsf-2.0b4.jar ${JARDIR}/bsh-bsf-2.0b4.jar 444
_install N bsh-classgen-2.0b4.jar ${JARDIR}/bsh-classgen-2.0b4.jar 444
_install N bsh-classpath-2.0b4.jar ${JARDIR}/bsh-classpath-2.0b4.jar 444
_install N bsh-commands-2.0b4.jar ${JARDIR}/bsh-commands-2.0b4.jar 444
_install N bsh-core-2.0b4.jar ${JARDIR}/bsh-core-2.0b4.jar 444
_install N bsh-reflect-2.0b4.jar ${JARDIR}/bsh-reflect-2.0b4.jar 444
_install N bsh-util-2.0b4.jar ${JARDIR}/bsh-util-2.0b4.jar 444
# Install demo applications
_install N bshservlet-wbsh.war ${DEMODIR}/bshservlet-wbsh.war 444
_install N bshservlet.war ${DEMODIR}/bshservlet.war 444
cd ${TOP}/${VERS}
# Install javadoc
install_dir javadoc ${JAVADOCDIR} 755 444
cd ${TOP}/${VERS}/docs/manual
#Install doc
_install N bshcommands-bshdoc.xml ${DOCDIR}/bshcommands-bshdoc.xml 444
exit 0