docsinstall revision 257875
1223897Snwhitehorn#!/bin/sh 2223897Snwhitehorn#- 3223897Snwhitehorn# Copyright (c) 2011 Marc Fonvieille 4223897Snwhitehorn# All rights reserved. 5223897Snwhitehorn# 6223897Snwhitehorn# Redistribution and use in source and binary forms, with or without 7223897Snwhitehorn# modification, are permitted provided that the following conditions 8223897Snwhitehorn# are met: 9223897Snwhitehorn# 1. Redistributions of source code must retain the above copyright 10223897Snwhitehorn# notice, this list of conditions and the following disclaimer. 11223897Snwhitehorn# 2. Redistributions in binary form must reproduce the above copyright 12223897Snwhitehorn# notice, this list of conditions and the following disclaimer in the 13223897Snwhitehorn# documentation and/or other materials provided with the distribution. 14223897Snwhitehorn# 15223897Snwhitehorn# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16223897Snwhitehorn# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17223897Snwhitehorn# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18223897Snwhitehorn# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19223897Snwhitehorn# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20223897Snwhitehorn# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21223897Snwhitehorn# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22223897Snwhitehorn# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23223897Snwhitehorn# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24223897Snwhitehorn# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25223897Snwhitehorn# SUCH DAMAGE. 26223897Snwhitehorn# 27223897Snwhitehorn# $FreeBSD: stable/10/usr.sbin/bsdinstall/scripts/docsinstall 257875 2013-11-09 00:59:31Z gjb $ 28223897Snwhitehorn 29223897Snwhitehorn 30223897Snwhitehornexec 3>&1 31223897SnwhitehornDOCS=$(dialog --backtitle "FreeBSD Installer" \ 32223897Snwhitehorn --title "FreeBSD Documentation Installation" --separate-output \ 33223897Snwhitehorn --checklist "This menu will allow you to install the whole documentation set 34223897Snwhitehornfrom the FreeBSD Documentation Project: Handbook, FAQ and articles.\n\n 35223897SnwhitehornPlease select the language versions you wish to install. At minimum, 36223897Snwhitehornyou should install the English version, this is the original version 37223897Snwhitehornof the documentation.\n\n 38223897SnwhitehornNB: This requires a working, configured network connection." 0 0 0 \ 39223897Snwhitehorn bn "Bengali Documentation" ${DIST_DOC_BN:-off} \ 40223897Snwhitehorn da "Danish Documentation" ${DIST_DOC_DA:-off} \ 41223897Snwhitehorn de "German Documentation" ${DIST_DOC_DE:-off} \ 42223897Snwhitehorn el "Greek Documentation" ${DIST_DOC_EL:-off} \ 43223897Snwhitehorn en "English Documentation (recommended)" ${DIST_DOC_EN:-on} \ 44223897Snwhitehorn es "Spanish Documentation" ${DIST_DOC_ES:-off} \ 45223897Snwhitehorn fr "French Documentation" ${DIST_DOC_FR:-off} \ 46223897Snwhitehorn hu "Hungarian Documentation" ${DIST_DOC_HU:-off} \ 47223897Snwhitehorn it "Italian Documentation" ${DIST_DOC_IT:-off} \ 48223897Snwhitehorn ja "Japanese Documentation" ${DIST_DOC_JA:-off} \ 49223897Snwhitehorn mn "Mongolian Documentation" ${DIST_DOC_MN:-off} \ 50223897Snwhitehorn nl "Dutch Documentation" ${DIST_DOC_NL:-off} \ 51223897Snwhitehorn pl "Polish Documentation" ${DIST_DOC_PL:-off} \ 52223897Snwhitehorn pt "Portuguese Documentation" ${DIST_DOC_PT:-off} \ 53223897Snwhitehorn ru "Russian Documentation" ${DIST_DOC_RU:-off} \ 54223897Snwhitehorn sr "Serbian Documentation" ${DIST_DOC_SR:-off} \ 55223897Snwhitehorn tr "Turkish Documentation" ${DIST_DOC_TR:-off} \ 56223897Snwhitehorn zh_cn "Simplified Chinese Documentation" ${DIST_DOC_ZH_CN:-off} \ 57223897Snwhitehorn zh_tw "Traditional Chinese Documentation" ${DIST_DOC_ZH_TW:-off} \ 58223897Snwhitehorn2>&1 1>&3) 59223897Snwhitehorntest $? -eq 0 || exit 0 60223897Snwhitehornexec 3>&- 61223897Snwhitehorn 62257875Sgjb# Let pkg(8) be able to use name servers 63224972Snwhitehorncp ${BSDINSTALL_TMPETC}/resolv.conf ${BSDINSTALL_CHROOT}/etc 64224972Snwhitehorn 65224972Snwhitehornerror() { 66224972Snwhitehorn dialog --backtitle "FreeBSD Installer" --title "Error" --msgbox \ 67224972Snwhitehorn "Could not install package $1 (`tail -n 1 ${BSDINSTALL_LOG}`)" 0 0 68224972Snwhitehorn exit 1 69224972Snwhitehorn} 70224972Snwhitehorn 71224972Snwhitehorn 72223897Snwhitehornclear 73223897Snwhitehornecho "FreeBSD Installer" 74223897Snwhitehornecho "========================" 75223897Snwhitehornecho 76223897Snwhitehorn 77257875Sgjbecho "Please wait while the repository metadata is fetched." 78257875Sgjbecho "This may take a few moments." 79257875Sgjb 80257875Sgjbenv ASSUME_ALWAYS_YES=1 pkg -c ${BSDINSTALL_CHROOT} install pkg \ 81257875Sgjb || error pkg 82257875Sgjb 83223897Snwhitehornfor i in $DOCS; do 84257875Sgjb env ASSUME_ALWAYS_YES=1 pkg -c ${BSDINSTALL_CHROOT} install ${i}-freebsd-doc \ 85257875Sgjb || error $i-freebsd-doc 86223897Snwhitehorndone 87