f_substr: Write to stdout when no `-v var_to_set'
Fixes ``setvar: : bad variable name''
This commit is contained in:
parent
679f1eab00
commit
9e81c4fb73
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=295195
@ -146,7 +146,11 @@ f_substr()
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$__var_to_set" ]; then
|
||||
setvar "$__var_to_set" "$__tmp"
|
||||
else
|
||||
echo "$__tmp"
|
||||
fi
|
||||
}
|
||||
|
||||
# f_sprintf $var_to_set $format [$arguments ...]
|
||||
|
Loading…
Reference in New Issue
Block a user