0
|
1 |
#!/usr/bin/ksh93
|
|
2 |
#
|
|
3 |
# CDDL HEADER START
|
|
4 |
#
|
|
5 |
# The contents of this file are subject to the terms of the
|
|
6 |
# Common Development and Distribution License (the "License").
|
|
7 |
# You may not use this file except in compliance with the License.
|
|
8 |
#
|
|
9 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
|
10 |
# or http://www.opensolaris.org/os/licensing.
|
|
11 |
# See the License for the specific language governing permissions
|
|
12 |
# and limitations under the License.
|
|
13 |
#
|
|
14 |
# When distributing Covered Code, include this CDDL HEADER in each
|
|
15 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
16 |
# If applicable, add the following below this CDDL HEADER, with the
|
|
17 |
# fields enclosed by brackets "[]" replaced with your own identifying
|
|
18 |
# information: Portions Copyright [yyyy] [name of copyright owner]
|
|
19 |
#
|
|
20 |
# CDDL HEADER END
|
|
21 |
#
|
|
22 |
|
|
23 |
#
|
|
24 |
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
|
|
25 |
# Use is subject to license terms.
|
|
26 |
#
|
|
27 |
|
|
28 |
#
|
|
29 |
#ident "@(#)install-sfw 1.1 09/07/10 SMI"
|
|
30 |
#
|
|
31 |
|
|
32 |
# stop at first error
|
|
33 |
set -o errexit
|
|
34 |
|
|
35 |
JEDIT_ROOT=${ROOT}/usr/share/${PROG_NAME}
|
|
36 |
MANDIR="${ROOT}/usr/share/man"
|
|
37 |
BINDIR="${ROOT}/usr/bin"
|
|
38 |
JAVA_DOC_DIR="${ROOT}/usr/share/lib/java/javadoc"
|
|
39 |
|
|
40 |
source ${SRC}/tools/install.subr
|
|
41 |
|
|
42 |
#
|
|
43 |
# Recursively install
|
|
44 |
#
|
|
45 |
install_dir()
|
|
46 |
{
|
|
47 |
my_dir=$1
|
|
48 |
my_targ=$2
|
|
49 |
my_dir_perm=$3
|
|
50 |
my_file_perm=$4
|
|
51 |
|
|
52 |
if [[ -d $my_targ ]]; then
|
|
53 |
rm -rf $my_targ/*
|
|
54 |
else
|
|
55 |
mkdir -p $my_targ
|
|
56 |
fi
|
|
57 |
|
|
58 |
cp -r $my_dir $my_targ
|
|
59 |
|
|
60 |
#change permission
|
|
61 |
find $my_targ -type d -exec chmod $my_dir_perm {} \;
|
|
62 |
find $my_targ -type f -exec chmod $my_file_perm {} \;
|
|
63 |
}
|
|
64 |
|
|
65 |
|
|
66 |
TOP=$(pwd)
|
|
67 |
# install man page
|
|
68 |
_install N jedit.1 ${MANDIR}/man1/jedit.1 444
|
|
69 |
|
|
70 |
cd ${TOP}/${JEDIT_SRC_DIR}/build
|
|
71 |
|
|
72 |
# install doc
|
|
73 |
install_dir "doc/*" ${JEDIT_ROOT}/doc 755 444
|
|
74 |
|
|
75 |
# install modes
|
|
76 |
install_dir "modes/*" "${JEDIT_ROOT}/modes" 755 444
|
|
77 |
|
|
78 |
# install startup
|
|
79 |
install_dir "startup/*" "${JEDIT_ROOT}/startup" 755 444
|
|
80 |
|
|
81 |
# install macros
|
|
82 |
install_dir "macros/*" "${JEDIT_ROOT}/macros" 755 444
|
|
83 |
|
|
84 |
# install properties
|
|
85 |
install_dir "properties/*" "${JEDIT_ROOT}/properties" 755 444
|
|
86 |
|
|
87 |
#install binary
|
|
88 |
_install N jedit.jar ${JEDIT_ROOT}/jedit.jar 444
|
|
89 |
_install S ../../jedit ${BINDIR}/jedit 555
|
|
90 |
|
|
91 |
exit 0
|