dot (252995) | dot (263791) |
---|---|
1#!/bin/sh 2#- 3# Copyright (c) 2012-2013 Devin Teske 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# | 1#!/bin/sh 2#- 3# Copyright (c) 2012-2013 Devin Teske 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: --- 10 unchanged lines hidden (view full) --- 19# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25# SUCH DAMAGE. 26# |
27# $FreeBSD: stable/9/usr.sbin/bsdconfig/dot/dot 252995 2013-07-07 19:13:34Z dteske $ | 27# $FreeBSD: stable/9/usr.sbin/bsdconfig/dot/dot 263791 2014-03-27 03:20:47Z dteske $ |
28# 29############################################################ INCLUDES 30 31# Prevent common.subr from auto initializing debugging (this is not an inter- 32# active utility that requires debugging; also `-d' has been repurposed). 33# 34DEBUG_SELF_INITIALIZE=NO 35 36BSDCFG_SHARE="/usr/share/bsdconfig" 37. $BSDCFG_SHARE/common.subr || exit 1 38f_dprintf "%s: loading includes..." "$0" 39 40BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="dot" 41f_include_lang $BSDCFG_LIBE/include/messages.subr 42f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr 43 | 28# 29############################################################ INCLUDES 30 31# Prevent common.subr from auto initializing debugging (this is not an inter- 32# active utility that requires debugging; also `-d' has been repurposed). 33# 34DEBUG_SELF_INITIALIZE=NO 35 36BSDCFG_SHARE="/usr/share/bsdconfig" 37. $BSDCFG_SHARE/common.subr || exit 1 38f_dprintf "%s: loading includes..." "$0" 39 40BSDCFG_LIBE="/usr/libexec/bsdconfig" APP_DIR="dot" 41f_include_lang $BSDCFG_LIBE/include/messages.subr 42f_include_lang $BSDCFG_LIBE/$APP_DIR/include/messages.subr 43 |
44ipgm=$( f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ) 45[ $? -eq $SUCCESS -a "$ipgm" ] && pgm="$ipgm" | 44f_index_menusel_keyword $BSDCFG_LIBE/$APP_DIR/INDEX "$pgm" ipgm && 45 pgm="${ipgm:-$pgm}" |
46 47############################################################ CONFIGURATION 48 49# 50# Location of bsdconfig(8) 51# 52BSDCONFIG=/usr/sbin/bsdconfig 53 --- 104 unchanged lines hidden (view full) --- 158 i) SHOW_INCLUDES= ;; 159 d) SHOW_GRAPH_LABEL_DATE= ;; 160 c) SHOW_CMDLINE= ;; 161 h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm" ;; 162 esac 163done 164shift $(( $OPTIND - 1 )) 165 | 46 47############################################################ CONFIGURATION 48 49# 50# Location of bsdconfig(8) 51# 52BSDCONFIG=/usr/sbin/bsdconfig 53 --- 104 unchanged lines hidden (view full) --- 158 i) SHOW_INCLUDES= ;; 159 d) SHOW_GRAPH_LABEL_DATE= ;; 160 c) SHOW_CMDLINE= ;; 161 h|\?) f_usage $BSDCFG_LIBE/$APP_DIR/USAGE "PROGRAM_NAME" "$pgm" ;; 162 esac 163done 164shift $(( $OPTIND - 1 )) 165 |
166cd $BSDCFG_LIBE || f_die 1 "$msg_directory_not_found" "$BSDCFG_LIB" | 166cd $BSDCFG_LIBE || f_die # Pedantic |
167 168# 169# Get a list of menu programs 170# 171menu_program_list= 172for file in [0-9][0-9][0-9].*/INDEX; do 173 menu_program_list="$menu_program_list $( 174 tail -r "$file" | awk -v item="${file%%/*}" ' --- 509 unchanged lines hidden --- | 167 168# 169# Get a list of menu programs 170# 171menu_program_list= 172for file in [0-9][0-9][0-9].*/INDEX; do 173 menu_program_list="$menu_program_list $( 174 tail -r "$file" | awk -v item="${file%%/*}" ' --- 509 unchanged lines hidden --- |