File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -45,15 +45,15 @@ for version in "${versions[@]}"; do
45
45
for tryVersion in " ${allVersions[@]} " ; do
46
46
if \
47
47
{
48
- versionReleasePage=" $( echo " $releasesPage " | grep " <td>Ruby $tryVersion </td>" -A 2 | awk -F ' "' ' $1 == "<td><a href=" { print $2; exit }' ) " \
48
+ versionReleasePage=" $( grep " <td>Ruby $tryVersion </td>" -A 2 <<< " $releasesPage " | awk -F ' "' ' $1 == "<td><a href=" { print $2; exit }' ) " \
49
49
&& [ " $versionReleasePage " ] \
50
- && shaVal=" $( curl -fsSL " https://www.ruby-lang.org/$versionReleasePage " | tac| tac| grep " ruby-$tryVersion .tar.xz" -A 5 | awk ' /^ SHA256:/ { print $2; exit }' ) " \
50
+ && shaVal=" $( curl -fsSL " https://www.ruby-lang.org/$versionReleasePage " | tac| tac| grep " ruby-$tryVersion .tar.xz" -A 5 | awk ' $1 == " SHA256:" { print $2; exit }' ) " \
51
51
&& [ " $shaVal " ]
52
52
} \
53
53
|| {
54
54
versionReleasePage=" $( echo " $newsPage " | grep -oE ' <a href="[^"]+">Ruby ' " $tryVersion " ' Released</a>' | cut -d' "' -f2) " \
55
55
&& [ " $versionReleasePage " ] \
56
- && shaVal=" $( curl -fsSL " https://www.ruby-lang.org/$versionReleasePage " | tac| tac| grep " ruby-$tryVersion .tar.xz" -A 5 | awk ' /^ SHA256:/ { print $2; exit }' ) " \
56
+ && shaVal=" $( curl -fsSL " https://www.ruby-lang.org/$versionReleasePage " | tac| tac| grep " ruby-$tryVersion .tar.xz" -A 5 | awk ' $1 == " SHA256:" { print $2; exit }' ) " \
57
57
&& [ " $shaVal " ]
58
58
} \
59
59
; then
You can’t perform that action at this time.
0 commit comments