kairyu/tkg-toolkit

Mac: ./reflash.sh: line 44: declare: -g: invalid option

hging opened this issue · 1 comments

hging commented

declare -g is also not available on any EL6 (BASH 4.1.2) or EL5 (BASH 3.2.25) platforms. This just broke our whole infrastructure!

It appears that the declare -g flag was added in BASH 4.2, I assume this wasn't tested?

I change it to

export "$line"

it works well :)

Finally I decided to use eval "$line" instead of export "$line". Fixed it by 326854b

Thank you.