docsinstall revision 223897
1207842Smm#!/bin/sh
2207842Smm#-
3207842Smm# Copyright (c) 2011 Marc Fonvieille
4207842Smm# All rights reserved.
5207842Smm#
6207842Smm# Redistribution and use in source and binary forms, with or without
7207842Smm# modification, are permitted provided that the following conditions
8207842Smm# are met:
9207842Smm# 1. Redistributions of source code must retain the above copyright
10207842Smm#    notice, this list of conditions and the following disclaimer.
11207842Smm# 2. Redistributions in binary form must reproduce the above copyright
12207842Smm#    notice, this list of conditions and the following disclaimer in the
13207842Smm#    documentation and/or other materials provided with the distribution.
14207842Smm#
15207842Smm# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16207842Smm# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17207842Smm# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18207842Smm# ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19207842Smm# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20207842Smm# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21207842Smm# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22207842Smm# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23207842Smm# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24207842Smm# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25207842Smm# SUCH DAMAGE.
26207842Smm#
27207842Smm# $FreeBSD: head/usr.sbin/bsdinstall/scripts/docsinstall 223897 2011-07-09 23:01:54Z nwhitehorn $
28207842Smm
29207842Smm
30207842Smmexec 3>&1
31207842SmmDOCS=$(dialog --backtitle "FreeBSD Installer" \
32207842Smm    --title "FreeBSD Documentation Installation" --separate-output \
33207842Smm    --checklist "This menu will allow you to install the whole documentation set
34207842Smmfrom the FreeBSD Documentation Project: Handbook, FAQ and articles.\n\n
35213700SmmPlease select the language versions you wish to install.  At minimum,
36213700Smmyou should install the English version, this is the original version
37213700Smmof the documentation.\n\n
38207842SmmNB: This requires a working, configured network connection." 0 0 0 \
39207842Smm	bn	"Bengali Documentation" ${DIST_DOC_BN:-off} \
40207842Smm	da	"Danish Documentation" ${DIST_DOC_DA:-off} \
41207842Smm	de	"German Documentation" ${DIST_DOC_DE:-off} \
42207842Smm	el	"Greek Documentation" ${DIST_DOC_EL:-off} \
43207844Smm	en	"English Documentation (recommended)" ${DIST_DOC_EN:-on} \
44207842Smm	es	"Spanish Documentation" ${DIST_DOC_ES:-off} \
45207842Smm	fr	"French Documentation" ${DIST_DOC_FR:-off} \
46207842Smm	hu	"Hungarian Documentation" ${DIST_DOC_HU:-off} \
47207842Smm	it	"Italian Documentation" ${DIST_DOC_IT:-off} \
48207842Smm	ja	"Japanese Documentation" ${DIST_DOC_JA:-off} \
49	mn	"Mongolian Documentation" ${DIST_DOC_MN:-off} \
50	nl	"Dutch Documentation" ${DIST_DOC_NL:-off} \
51	pl	"Polish Documentation" ${DIST_DOC_PL:-off} \
52	pt	"Portuguese Documentation" ${DIST_DOC_PT:-off} \
53	ru	"Russian Documentation" ${DIST_DOC_RU:-off} \
54	sr	"Serbian Documentation" ${DIST_DOC_SR:-off} \
55	tr	"Turkish Documentation" ${DIST_DOC_TR:-off} \
56	zh_cn	"Simplified Chinese Documentation" ${DIST_DOC_ZH_CN:-off} \
57	zh_tw	"Traditional Chinese Documentation" ${DIST_DOC_ZH_TW:-off} \
582>&1 1>&3)
59test $? -eq 0 || exit 0
60exec 3>&-
61
62clear
63echo "FreeBSD Installer"
64echo "========================"
65echo
66
67for i in $DOCS; do
68    pkg_add -C ${BSDINSTALL_CHROOT} -r ${i}-freebsd-doc
69done
70