Skip to content

support Dash as /bin/sh#342

Merged
Conan-Kudo merged 1 commit intoAsahiLinux:mainfrom
JtMotoX:support-dash
Feb 19, 2025
Merged

support Dash as /bin/sh#342
Conan-Kudo merged 1 commit intoAsahiLinux:mainfrom
JtMotoX:support-dash

Conversation

@JtMotoX
Copy link
Copy Markdown
Contributor

@JtMotoX JtMotoX commented Nov 29, 2024

I am using Dash for /bin/sh and the Asahi installer fails with "Your version of cURL is too old". This is because the curl check uses &>/dev/null which Dash does not support. Updating to use the more compatible >/dev/null 2>&1 instead.

> curl https://alx.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  2289  100  2289    0     0   4364      0 --:--:-- --:--:-- --:--:--  4368
Your version of cURL is too old. This usually means your macOS is very out
of date. Installing Asahi Linux requires at least macOS version 13.5.

> sw_vers
ProductName:		macOS
ProductVersion:		15.1.1
BuildVersion:		24B91

> what /bin/sh
/bin/sh:
	PROGRAM:sh  PROJECT:dash-16
	PROGRAM:sh  PROJECT:dash-16

> /bin/sh -c 'if ! date &>&1; then echo "something wrong"; else echo "something right"; fi'
something wrong
Fri Nov 29 14:21:27 PST 2024

> /bin/sh -c 'if ! date >/dev/null 2>&1; then echo "something wrong"; else echo "something right"; fi'
something right

Signed-off-by: JtMotoX <7191259+JtMotoX@users.noreply.github.com>
@Conan-Kudo
Copy link
Copy Markdown
Member

How are you using Dash as /bin/sh on macOS? It should only support zsh or bash...

@JtMotoX
Copy link
Copy Markdown
Contributor Author

JtMotoX commented Feb 19, 2025

Yes, I am and have been for years. The development I do requires POSIX-compliance. This asahi installer is the only thing I have ever encountered compatibility issues with using dash.

@Conan-Kudo Conan-Kudo merged commit 74b2b36 into AsahiLinux:main Feb 19, 2025
@Conan-Kudo
Copy link
Copy Markdown
Member

I've merged this pull request as the change is trivial, but please be aware that we make no guarantees or provide any expectations that our scripts will remain POSIX sh compatible. Using a shell other than bash or zsh to execute our scripts on macOS remains fully unsupported.

@JtMotoX
Copy link
Copy Markdown
Contributor Author

JtMotoX commented Feb 19, 2025

Understood. And thank you for merging. 👍 After I made these changes locally, I was able to fully install Asahi on my dash mac.

@JtMotoX JtMotoX deleted the support-dash branch February 19, 2025 17:57
davide125 pushed a commit that referenced this pull request Apr 15, 2025
This is compatible with Dash.

Signed-off-by: JtMotoX <7191259+JtMotoX@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants