Home | History | Annotate | Download | only in bash
      1 #!/bin/bash
      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 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
     24 # Use is subject to license terms.
     25 #
     26 #ident	"@(#)install-sfw	1.2	09/10/26 SMI"
     27 #
     28 
     29 VERS=bash-4.0
     30 
     31 PREFIX=${ROOT}/usr
     32 GNUPREFIX=${ROOT}/usr/gnu
     33 BINDIR=${PREFIX}/bin
     34 SHAREDIR=${PREFIX}/share
     35 MAN1DIR=${SHAREDIR}/man/man1
     36 INFODIR=${PREFIX}/share/info
     37 LOCALEDIR=${PREFIX}/share/locale
     38 ETCDIR=${ROOT}/etc/bash
     39 
     40 . ${SRC}/tools/install.subr
     41 
     42 # manpages is converted by sunman-stability sed-script to
     43 # append the stability and availability. 
     44 
     45 MANSCRIPT=${SRC}/cmd/bash/sunman-stability
     46 
     47 for manpage in \
     48     bash.1
     49 do
     50     _install M ${VERS}/doc/$manpage ${MAN1DIR}/${manpage} 0444
     51 done
     52 
     53 _install N ${SRC}/cmd/bash/Solaris/rbash.1 ${MAN1DIR}/rbash.1 0444
     54 _install N ${VERS}/doc/bashref.info ${INFODIR}/bash.info 0444
     55 
     56 cd ${VERS}
     57 
     58 _install E bash ${BINDIR}/bash 0555
     59 _install L ./bash ${BINDIR}/rbash
     60 _install L ../../bin/bash ${GNUPREFIX}/bin/sh
     61 
     62 for file in \
     63     "af" \
     64     "bg" \
     65     "ca" \
     66     "cs" \
     67     "de" \
     68     "eo" \
     69     "es" \
     70     "et" \
     71     "fr" \
     72     "hu" \
     73     "id" \
     74     "ja" \
     75     "lt" \
     76     "nl" \
     77     "pl" \
     78     "pt_BR" \
     79     "ro" \
     80     "ru" \
     81     "sk" \
     82     "sv" \
     83     "tr" \
     84     "vi" \
     85     "zh_TW"
     86 do
     87     _install N ${INSTDIR}/usr/share/locale/${file}/LC_MESSAGES/bash.mo ${LOCALEDIR}/${file}/LC_MESSAGES/bash.mo 0444
     88 done
     89 
     90 for file in \
     91     "en" \
     92     "en_CA" \
     93     "en_GB"
     94 do
     95     _install N ${INSTDIR}/usr/share/locale/en@boldquot/LC_MESSAGES/bash.mo ${LOCALEDIR}/${file}/LC_MESSAGES/bash.mo 0444
     96 done
     97 
     98 for file in \
     99     "alias" \
    100     "arith" \
    101     "arith_for" \
    102     "bg" \
    103     "bind" \
    104     "break" \
    105     "builtin" \
    106     "caller" \
    107     "case" \
    108     "cd" \
    109     "colon" \
    110     "command" \
    111     "compgen" \
    112     "complete" \
    113     "compopt" \
    114     "conditional" \
    115     "continue" \
    116     "coproc" \
    117     "declare" \
    118     "dirs" \
    119     "disown" \
    120     "dot" \
    121     "echo" \
    122     "enable" \
    123     "eval" \
    124     "exec" \
    125     "exit" \
    126     "export" \
    127     "false" \
    128     "fc" \
    129     "fg" \
    130     "fg_percent" \
    131     "for" \
    132     "function" \
    133     "getopts" \
    134     "grouping_braces" \
    135     "hash" \
    136     "help" \
    137     "history" \
    138     "if" \
    139     "jobs" \
    140     "kill" \
    141     "let" \
    142     "local" \
    143     "logout" \
    144     "mapfile" \
    145     "popd" \
    146     "printf" \
    147     "pushd" \
    148     "pwd" \
    149     "read" \
    150     "readarray" \
    151     "readonly" \
    152     "return" \
    153     "select" \
    154     "set" \
    155     "shift" \
    156     "shopt" \
    157     "source" \
    158     "suspend" \
    159     "test" \
    160     "test_bracket" \
    161     "time" \
    162     "times" \
    163     "trap" \
    164     "true" \
    165     "type" \
    166     "typeset" \
    167     "ulimit" \
    168     "umask" \
    169     "unalias" \
    170     "unset" \
    171     "until" \
    172     "variable_help" \
    173     "wait" \
    174     "while"
    175 do
    176     _install N ${INSTDIR}/usr/share/bash/${file} ${SHAREDIR}/bash/${file} 0444
    177 done
    178 
    179 
    180 _install N ${SCRIPTDIR}/etc.bash.bashrc ${ETCDIR}/bashrc.example 0755
    181 _install N ${SCRIPTDIR}/etc.bash.bash_completion ${ETCDIR}/bash_completion.example 0755
    182 _install N ${SCRIPTDIR}/etc.bash.inputrc ${ETCDIR}/inputrc.example 0755
    183 
    184 exit 0
    185 
    186