@@ -41,20 +41,21 @@ SIMPLATFORMS_REGEX="m/(.*)\t(.*)\t(.*)\t(.*)/g"
4141if [[ -n $OSVERSION_REGEX ]]; then
4242 echo " Finding OS version using regex: ${OSVERSION_REGEX} ."
4343 MATCHES=$( echo " ${SIMPLATFORMS} " | perl -nle ' if (' $SIMPLATFORMS_REGEX ' ) { ($name, $plat, $os, $id) = ($1, $2, $3, $4); if ($os =~ /' $OSVERSION_REGEX ' /) { print "${name}\t${plat}\t${os}\t${id}"; } }' )
44+ MATCHESDESC=$( echo " ${MATCHES} " | perl -nle ' if (' $SIMPLATFORMS_REGEX ' ) { ($name, $plat, $os, $id) = ($1, $2, $3, $4); print "${name} (${plat} - ${os}) - ${id}"; }' )
4445 TOPLINEMATCH=$( echo " ${MATCHES} " | head -n 1)
4546 DESTID=$( echo " ${TOPLINEMATCH} " | perl -le ' if (' $SIMPLATFORMS_REGEX ' ) { ($name, $plat, $os, $id) = ($1, $2, $3, $4); if ($os =~ /' $OSVERSION_REGEX ' /) { print "${id}"; } }' )
4647 DESTDESC=$( echo " ${TOPLINEMATCH} " | perl -le ' if (' $SIMPLATFORMS_REGEX ' ) { ($name, $plat, $os, $id) = ($1, $2, $3, $4); if ($os =~ /' $OSVERSION_REGEX ' /) { print "${name} (${plat} - ${os}) - ${id}"; } }' | head -n 1)
4748else
4849 echo " Finding latest OS version for target."
49- MATCHES= " $ SIMPLATFORMS"
50+ MATCHESDESC= $( echo " ${ SIMPLATFORMS} " | perl -nle ' if ( ' $SIMPLATFORMS_REGEX ' ) { ($name, $plat, $os, $id) = ($1, $2, $3, $4); print "${name} (${plat} - ${os}) - ${id}"; } ' )
5051 TOPLINEMATCH=$( echo " ${SIMPLATFORMS} " | head -1)
5152 DESTID=$( echo " ${TOPLINEMATCH} " | perl -nle ' if (' $SIMPLATFORMS_REGEX ' ) { ($name, $plat, $os, $id) = ($1, $2, $3, $4); print $id; }' )
5253 DESTDESC=$( echo " ${TOPLINEMATCH} " | perl -nle ' if (' $SIMPLATFORMS_REGEX ' ) { ($name, $plat, $os, $id) = ($1, $2, $3, $4); print "${name} (${plat} - ${os}) - ${id}"; }' )
5354fi
5455
5556# Provide diagnostic output of all matching simulators.
5657echo " Available simulators matching the target:"
57- echo " $( echo " $MATCHES " | while read line; do echo " - $line " ; done)"
58+ echo " $( echo " $MATCHESDESC " | while read line; do echo " - $line " ; done)"
5859
5960# Exit out if no simulators matched the criteria.
6061if [[ -z $DESTID ]]; then echo " ⛔️ Error: No matching simulators available." ; exit 1; fi
0 commit comments