Skip to content

Commit a660dab

Browse files
committed
Ditch "tac|tac" for more reliable scraping
1 parent 826fc07 commit a660dab

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

versions.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ else
1717
fi
1818
versions=( "${versions[@]%/}" )
1919

20-
getPipCommit="$(curl -fsSL 'https://github.com/pypa/get-pip/commits/main/public/get-pip.py.atom' | tac|tac | awk -F '[[:space:]]*[<>/]+' '$2 == "id" && $3 ~ /Commit/ { print $4; exit }')"
20+
getPipCommit="$(curl -fsSL 'https://github.com/pypa/get-pip/commits/main/public/get-pip.py.atom' | grep -E 'id.*Commit')"
21+
getPipCommit="$(awk <<<"$getPipCommit" -F '[[:space:]]*[<>/]+' '$2 == "id" && $3 ~ /Commit/ { print $4; exit }')"
2122
getPipUrl="https://github.com/pypa/get-pip/raw/$getPipCommit/public/get-pip.py"
2223
getPipSha256="$(curl -fsSL "$getPipUrl" | sha256sum | cut -d' ' -f1)"
2324
export getPipUrl getPipSha256

0 commit comments

Comments
 (0)