csweichel / lama

Run "curl -L lama.sh | sh" to start a web server
https://lama.sh
MIT License
70 stars 17 forks source link

Download script fails to support aarch64 architecture for Android devices #6

Open CodeIter opened 1 year ago

CodeIter commented 1 year ago

Hi, I encountered this issue while trying to download your http server on my Android device with the aarch64 architecture. I noticed that the download script assumes that all possible values of uname -s + "_" + uname -m have binaries in your GitHub release. However, I found that this assumption is not valid as your release page only has arm64 binaries for Android and other operating systems.

I also noticed that the script assumes that Android architecture is arm64, but my device's architecture is aarch64. As a result, the script failed to download the server binary and gave me an error message.

To reproduce the error, I ran the following command:

curl -fsSL https://lama.sh | sh -x

And here's the error message I received:

curl: (2) no URL specified!
curl: try 'curl --help' for more information

I was able to download the arm64 binary manually and run it on my device using the UserLand application, but I wanted to bring this issue to your attention so that you can update your download script to support the aarch64 architecture for Android devices.

Thank you for your attention to this matter. Peace 🕊️

CodeIter commented 1 year ago

A quick fix is changing : https://github.com/csweichel/lama/blob/a355fc4dda1dc235e3f14266c2bc2b46f938ae5c/docs/index.html#L33 With

- export platform="$(uname -s)_$(uname -m)"
+ export platform="$(uname -s)_$(uname -m | sed -ure 's~aarch64~arm64~')"