f_die() (see `bsdconfig includes -dF die') uses a dialog box (and has been

documented as such; I just forgot). These utilities are command-line only
and as such should stick to either using f_die without arguments or printf)
This commit is contained in:
Devin Teske 2013-11-21 19:43:45 +00:00
parent 3255f7e6f0
commit de7b456e59
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=258439
2 changed files with 6 additions and 4 deletions

View File

@ -163,7 +163,7 @@ while getopts cdhi flag; do
done
shift $(( $OPTIND - 1 ))
cd $BSDCFG_LIBE || f_die 1 "$msg_directory_not_found" "$BSDCFG_LIB"
cd $BSDCFG_LIBE || f_die # Pedantic
#
# Get a list of menu programs

View File

@ -137,7 +137,7 @@ done
shift $(( $OPTIND - 1 ))
# cd(1) to `share' dir so relative paths work for find and positional args
cd $BSDCFG_SHARE || f_die 1 "$msg_directory_not_found" "$BSDCFG_SHARE"
cd $BSDCFG_SHARE || f_die # Pedantic
#
# If given an argument, operate on it specifically (implied `-f') and exit
@ -147,9 +147,11 @@ for include in "$@"; do
# See if they've just omitted the `*.subr' suffix
[ -f "$include.subr" -a ! -f "$include" ] && include="$include.subr"
if [ ! -f "$include" ]; then
f_die 1 "$msg_no_such_file_or_directory" "$0" "$include"
printf "$msg_no_such_file_or_directory" "$0" "$include"
exit $FAILURE
elif [ ! -r "$include" ]; then
f_die 1 "$msg_permission_denied" "$0" "$include"
printf "$msg_permission_denied" "$0" "$include"
exit $FAILURE
fi
show_include "$include" || f_die
done