Only get the first .pkg detected

This commit is contained in:
CorpNewt
2025-01-08 15:11:22 -06:00
committed by GitHub
parent f9d2bb26ae
commit 69ca020a50
+1 -1
View File
@@ -90,7 +90,7 @@ download_py () {
echo "Located Version: $vers"
echo
echo "Building download url..."
url="$(curl -L https://www.python.org/downloads/release/python-${vers//./}/ --compressed 2>&1 | grep -iE "python-$vers-macos.*.pkg\"" | awk -F'"' '{ print $2 }')"
url="$(curl -L https://www.python.org/downloads/release/python-${vers//./}/ --compressed 2>&1 | grep -iE "python-$vers-macos.*.pkg\"" | awk -F'"' '{ print $2 }' | head -n 1)"
if [ -z "$url" ]; then
# Couldn't get the URL - bail
print_error