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