libmakepkg: simplify splitting command output into array

Use mapfile instead of hacking around read -a with the $IFS.

Signed-off-by: Eli Schwartz <eschwartz@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
Eli Schwartz 2019-01-10 00:58:42 -05:00 committed by Allan McRae
parent 031611ff40
commit 5d2f7ee6c3

View file

@ -29,7 +29,7 @@ executable_functions+=('executable_checksum')
executable_checksum() {
if (( GENINTEG || ! SKIPCHECKSUMS )); then
local integlist
IFS=$'\n' read -rd '' -a integlist < <(get_integlist)
mapfile -t integlist < <(get_integlist)
local integ
for integ in "${integlist[@]}"; do