Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git update-git-for-windows: download ARM64 Git for Windows if applicable #340

Merged
merged 1 commit into from
May 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions git-extra/git-update-git-for-windows
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,14 @@ update_git_for_windows () {
test -n "$quiet" && test "x$recently_seen" = "x$latest" && return

version=$(git --version | sed "s/git version //")
echo "$git_label $version (${bit}bit)" >&2
if test -d /arm64/bin
then
arch_bit=ARM64
else
arch_bit=${bit}-bit
fi

echo "$git_label $version ($arch_bit)" >&2
if test -z "$testing" && test "$latest" = "$version"
then
echo "Up to date" >&2
Expand All @@ -237,7 +244,7 @@ update_git_for_windows () {
releases=$(http_get $releases_url/latest) || return
download=$(echo "$releases" |
grep '"browser_download_url": "' |
grep "$bit\-bit\.exe" |
grep "$arch_bit\.exe" |
sed -E 's/.*": "([^"]*).*/\1/')
filename=$(echo "$download" | sed -E 's/.*\/([^\/]*)$/\1/')
name="$(echo "$releases" | sed -n 's/^ "name": "\(.*\)",$/\1/p')"
Expand Down