[pacman-dev] [PATCH] libmakepkg: simplify splitting command output into array

Eli Schwartz eschwartz at archlinux.org
Thu Jan 10 05:58:42 UTC 2019


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

Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---
 scripts/libmakepkg/executable/checksum.sh.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/libmakepkg/executable/checksum.sh.in b/scripts/libmakepkg/executable/checksum.sh.in
index 9783d4ee..0a4b0c9e 100644
--- a/scripts/libmakepkg/executable/checksum.sh.in
+++ b/scripts/libmakepkg/executable/checksum.sh.in
@@ -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
-- 
2.20.1


More information about the pacman-dev mailing list