diff options
Diffstat (limited to 'usr.sbin/bsdconfig/docsinstall')
-rw-r--r-- | usr.sbin/bsdconfig/docsinstall/INDEX | 57 | ||||
-rw-r--r-- | usr.sbin/bsdconfig/docsinstall/Makefile | 11 | ||||
-rw-r--r-- | usr.sbin/bsdconfig/docsinstall/Makefile.depend | 11 | ||||
-rw-r--r-- | usr.sbin/bsdconfig/docsinstall/USAGE | 37 | ||||
-rwxr-xr-x | usr.sbin/bsdconfig/docsinstall/docsinstall | 97 | ||||
-rw-r--r-- | usr.sbin/bsdconfig/docsinstall/include/Makefile | 6 | ||||
-rw-r--r-- | usr.sbin/bsdconfig/docsinstall/include/Makefile.depend | 11 | ||||
-rw-r--r-- | usr.sbin/bsdconfig/docsinstall/include/messages.subr | 28 |
8 files changed, 258 insertions, 0 deletions
diff --git a/usr.sbin/bsdconfig/docsinstall/INDEX b/usr.sbin/bsdconfig/docsinstall/INDEX new file mode 100644 index 0000000..6308f30 --- /dev/null +++ b/usr.sbin/bsdconfig/docsinstall/INDEX @@ -0,0 +1,57 @@ +# Copyright (c) 2012 Ron McDowell +# Copyright (c) 2012 Devin Teske +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +# +# Title that will be shown in the bsdconfig menu. +# +menu_title="Documentation installation" + +# +# A short descriptive line shown at the bottom of the bsdconfig menu. keep it +# short because any line longer than the terminal width will be truncated. +# +menu_help="Install FreeBSD Documentation set" + +# +# Two-part variable that defines an action to take when `keyword' is passed on +# a bsdconfig command line. Variable takes the form "keyword|command" and +# multiple occurrences of the variable (with different `keyword's, or different +# `keyword's AND `command's) are allowed. If `command' begins with a '/' then +# the full path to the program is needed. If `command' begins with anything +# else it is a path relative to the directory this INDEX file is in. `keyword' +# can be i18n'ed but `command' is the name of a script. +# +menu_selection="docsinstall|docsinstall" + +# +# ------------ Items below this line do NOT need i18n translation ------------ +# +# Name of the program to be run when this menu choice is selected. If it begins +# with a '/' then the full path to the program is needed. If it begins with +# anything else it is a path relative to the directory this INDEX file is in. +# +menu_program="docsinstall" diff --git a/usr.sbin/bsdconfig/docsinstall/Makefile b/usr.sbin/bsdconfig/docsinstall/Makefile new file mode 100644 index 0000000..2ab3a68 --- /dev/null +++ b/usr.sbin/bsdconfig/docsinstall/Makefile @@ -0,0 +1,11 @@ +# $FreeBSD$ + +SUBDIR= include + +FILESDIR= ${LIBEXECDIR}/bsdconfig/020.docsinstall +FILES= INDEX USAGE + +SCRIPTSDIR= ${FILESDIR} +SCRIPTS= docsinstall + +.include <bsd.prog.mk> diff --git a/usr.sbin/bsdconfig/docsinstall/Makefile.depend b/usr.sbin/bsdconfig/docsinstall/Makefile.depend new file mode 100644 index 0000000..f80275d --- /dev/null +++ b/usr.sbin/bsdconfig/docsinstall/Makefile.depend @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/bsdconfig/docsinstall/USAGE b/usr.sbin/bsdconfig/docsinstall/USAGE new file mode 100644 index 0000000..a06d8af --- /dev/null +++ b/usr.sbin/bsdconfig/docsinstall/USAGE @@ -0,0 +1,37 @@ +# Copyright (c) 2012-2013 Devin Teske +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +Usage: bsdconfig @PROGRAM_NAME@ [OPTIONS] + +OPTIONS: + -d Provide lots of debugging info on standard-out when running. + -D file Send debugging info to file. If file begins with a plus-sign + debug info is sent to both standard-out and file (minus the + leading plus). + -h Print this usage statement and exit. + -S Secure X11 mode (implies `-X'). As root, always prompt-for + and validate sudo(8) username/password before starting. + -X Use Xdialog(1) in place of dialog(1). diff --git a/usr.sbin/bsdconfig/docsinstall/docsinstall b/usr.sbin/bsdconfig/docsinstall/docsinstall new file mode 100755 index 0000000..19128fe --- /dev/null +++ b/usr.sbin/bsdconfig/docsinstall/docsinstall @@ -0,0 +1,97 @@ +#!/bin/sh +#- +# Copyright (c) 2012-2013 Devin Teske +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# +############################################################ INCLUDES + +BSDCFG_SHARE="/usr/share/bsdconfig" +. $BSDCFG_SHARE/common.subr || exit 1 +f_dprintf "%s: loading includes..." "$0" +f_include $BSDCFG_SHARE/dialog.subr +f_include $BSDCFG_SHARE/mustberoot.subr + +BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="020.docsinstall" +f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr + +f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && + pgm="${ipgm:-$pgm}" + +############################################################ CONFIGURATION + +# +# If X11 is requested, which terminal and what options should we use? +# +X11TERM=xterm +X11TERM_OPTS= + +############################################################ MAIN + +# Incorporate rc-file if it exists +[ -f "$HOME/.bsdconfigrc" ] && f_include "$HOME/.bsdconfigrc" + +# +# Process command-line arguments +# +while getopts h$GETOPTS_STDARGS flag; do + case "$flag" in + h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm" ;; + esac +done +shift $(( $OPTIND - 1 )) + +# +# Initialize +# +f_mustberoot_init + +# +# If Xdialog(1) is requested, we'll need to wrap bsdinstall(8) into xterm(1) +# +if [ "$USE_XDIALOG" ]; then + # + # Make sure $X11TERM exists and is executable + # + case "$X11TERM" in + */*) + [ -e "$X11TERM" ] || f_die 1 \ + "$msg_no_such_file_or_directory" "$pgm" "$X11TERM" + [ -x "$X11TERM" ] || f_die 1 \ + "$msg_permission_denied" "$pgm" "$X11TERM" + ;; + *) + f_have "$X11TERM" || f_die 1 \ + "$msg_no_such_file_or_directory" "$pgm" "$X11TERM" + esac + + exec $X11TERM $X11TERM_OPTS -e /usr/sbin/bsdinstall docsinstall +else + exec /usr/sbin/bsdinstall docsinstall +fi + +################################################################################ +# END +################################################################################ diff --git a/usr.sbin/bsdconfig/docsinstall/include/Makefile b/usr.sbin/bsdconfig/docsinstall/include/Makefile new file mode 100644 index 0000000..a3ca529 --- /dev/null +++ b/usr.sbin/bsdconfig/docsinstall/include/Makefile @@ -0,0 +1,6 @@ +# $FreeBSD$ + +FILESDIR= ${LIBEXECDIR}/bsdconfig/020.docsinstall/include +FILES= messages.subr + +.include <bsd.prog.mk> diff --git a/usr.sbin/bsdconfig/docsinstall/include/Makefile.depend b/usr.sbin/bsdconfig/docsinstall/include/Makefile.depend new file mode 100644 index 0000000..f80275d --- /dev/null +++ b/usr.sbin/bsdconfig/docsinstall/include/Makefile.depend @@ -0,0 +1,11 @@ +# $FreeBSD$ +# Autogenerated - do NOT edit! + +DIRDEPS = \ + + +.include <dirdeps.mk> + +.if ${DEP_RELDIR} == ${_DEP_RELDIR} +# local dependencies - needed for -jN in clean tree +.endif diff --git a/usr.sbin/bsdconfig/docsinstall/include/messages.subr b/usr.sbin/bsdconfig/docsinstall/include/messages.subr new file mode 100644 index 0000000..4c55f0f --- /dev/null +++ b/usr.sbin/bsdconfig/docsinstall/include/messages.subr @@ -0,0 +1,28 @@ +# Copyright (c) 2012 Devin Teske +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ + +msg_no_such_file_or_directory="%s: %s: No such file or directory" +msg_permission_denied="%s: %s: permission denied" |