jpillora / installer

One-liner for installing binaries from Github releases
https://i.jpillora.com/installer
MIT License
206 stars 52 forks source link

wrong parsed arch on casey/just #33

Closed jpambrun closed 1 year ago

jpambrun commented 1 year ago
>> uname -a
Linux jpambrun-rancher 3.10.0-1160.83.1.el7.x86_64 #1 SMP Wed Jan 25 16:41:43 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

>> curl -s https://i.jpillora.com/casey/just! | bash
Installing casey/just 1.13.0 (linux/amd64).....
######################################################################## 100.0%
mv with sudo...
Installed at /usr/local/bin/just

>> file /usr/local/bin/just
/usr/local/bin/just: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, BuildID[sha1]=5dd31aa9ff55b6b00d45dc70e07bac6d376f90f9, not stripped

Should have got x86_64, but got aarch64.

jpambrun commented 1 year ago

It's got the wrong asset for linux_amd64

        #choose from asset list
        URL=""
        FTYPE=""
        case "${OS}_${ARCH}" in
        "darwin_amd64")
                URL="https://github.com/casey/just/releases/download/1.13.0/just-1.13.0-aarch64-apple-darwin.tar.gz"
                FTYPE=".tar.gz"
                ;;
        "linux_amd64")
                URL="https://github.com/casey/just/releases/download/1.13.0/just-1.13.0-aarch64-unknown-linux-musl.tar.gz"
                FTYPE=".tar.gz"
                ;;
        "linux_arm")
                URL="https://github.com/casey/just/releases/download/1.13.0/just-1.13.0-armv7-unknown-linux-musleabihf.tar.gz"
                FTYPE=".tar.gz"
                ;;
jpillora commented 1 year ago

Ahh definitely a bug. it currently checks amd64 is go convention, then falls back to looking for 64 - hence this bug. installer needs to check convention too (x86_64)

PRs accepted :D