mrhaydendp / Fire-Tools

Tools for debloating and installing Google Play Services on Fire Tablets + More!
https://blog.mrhaydendp.com/fire-tools
MIT License
183 stars 12 forks source link

substitute readarray for old versions of bash #16

Closed danieltwagner closed 2 years ago

danieltwagner commented 2 years ago

macOS Monterey 12.1 offers

$ bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin21)
Copyright (C) 2007 Free Software Foundation, Inc.

... which sadly doesn't support mapfile/readarray.

I found this helpful substitute https://stackoverflow.com/questions/41475261/need-alternative-to-readarray-mapfile-for-script-on-older-version-of-bash which does the job for me on macOS.