moparisthebest / static-curl

fully static builds of curl, runs anywhere
https://code.moparisthebest.com/moparisthebest/static-curl
MIT License
497 stars 30 forks source link

Inconsistent architecture naming #8

Open kamermans opened 1 year ago

kamermans commented 1 year ago

In your binary releases, you release binaries for amd64 and aarch64, but these are two different naming conventions, so pulling the correct binary programmatically is unnecessarily difficult.

I would recommend you use either amd64 and arm64 (the output of dpkg --print-architecture on debian) or x86_64 and aarch64 (the output of uname -m on most/all Linux machines).

That way people can write scripts like this:

curl -sSL -o /tmp/curl "https://github.com/moparisthebest/static-curl/releases/download/v7.87.0/curl-$(dpkg --print-architecture)"

OR

curl -sSL -o /tmp/curl "https://github.com/moparisthebest/static-curl/releases/download/v7.87.0/curl-$(uname -m)"

At the moment I have to use this:

ARCH=$(dpkg --print-architecture)
if [[ $ARCH = 'arm64' ]]; then
    ARCH=aarch64
fi

curl -sSL -o /tmp/curl "https://github.com/moparisthebest/static-curl/releases/download/v7.87.0/curl-$ARCH"