Author: dteske Date: Wed Feb 3 03:03:04 2016 New Revision: 295195 URL: https://svnweb.freebsd.org/changeset/base/295195
Log: f_substr: Write to stdout when no `-v var_to_set' Fixes ``setvar: : bad variable name'' Modified: head/usr.sbin/bsdconfig/share/strings.subr Modified: head/usr.sbin/bsdconfig/share/strings.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/strings.subr Wed Feb 3 02:46:00 2016 (r295194) +++ head/usr.sbin/bsdconfig/share/strings.subr Wed Feb 3 03:03:04 2016 (r295195) @@ -146,7 +146,11 @@ f_substr() fi done - setvar "$__var_to_set" "$__tmp" + if [ "$__var_to_set" ]; then + setvar "$__var_to_set" "$__tmp" + else + echo "$__tmp" + fi } # f_sprintf $var_to_set $format [$arguments ...] _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"