Use mapfile instead of () for reading multiple lines as separate array items

This commit is contained in:
Kamil Śliwak 2020-12-12 03:05:06 +01:00
parent a05f3a608d
commit dbfd3db038

View File

@ -66,11 +66,12 @@ function versionEqual()
function getAllAvailableVersions()
{
allVersions=()
local allListedVersions=( $(
local allListedVersions
mapfile -t allListedVersions <<< "$(
wget -q -O- https://binaries.soliditylang.org/bin/list.txt |
grep -Po '(?<=soljson-v)\d+.\d+.\d+(?=\+commit)' |
sort -V
) )
)"
for listed in "${allListedVersions[@]}"
do
if versionGreater "$listed" "0.4.10"