mirror of https://git.envs.net/envs/burrow.git
Remove BASH_VERSION check, just stick with lowest common denominator ;)
This commit is contained in:
parent
a8ec4d6c57
commit
516f835ad3
8
burrow
8
burrow
|
@ -566,12 +566,8 @@ getline () {
|
||||||
_var=${2:-_line}
|
_var=${2:-_line}
|
||||||
_default="$3"
|
_default="$3"
|
||||||
if [ -t 0 ]; then
|
if [ -t 0 ]; then
|
||||||
if [ -n "$BASH_VERSION" ]; then
|
printf "%s: " "$1"
|
||||||
read -erp "$1: " "$_var"
|
IFS= read -r "$_var"
|
||||||
else
|
|
||||||
printf "%s: " "$1"
|
|
||||||
IFS= read -r "$_var"
|
|
||||||
fi
|
|
||||||
# use default if possible when input is blank
|
# use default if possible when input is blank
|
||||||
_val=$(eval echo \$${_var})
|
_val=$(eval echo \$${_var})
|
||||||
if [ ! -n "$_val" ] && [ -n "$_default" ]; then
|
if [ ! -n "$_val" ] && [ -n "$_default" ]; then
|
||||||
|
|
Loading…
Reference in New Issue