Skip to content
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
5 changes: 4 additions & 1 deletion scripts/bashbrew-host-arch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ if command -v apk > /dev/null && tryArch="$(apk --print-arch)"; then
arch="$tryArch"
elif command -v dpkg > /dev/null && tryArch="$(dpkg --print-architecture)"; then
arch="${tryArch##*-}"
elif command -v rpm > /dev/null && tryArch="$(rpm --query --queryformat='%{ARCH}' rpm)"; then
arch="$tryArch"
elif command -v uname > /dev/null && tryArch="$(uname -m)"; then
echo >&2 "warning: neither of 'dpkg' or 'apk' found, falling back to 'uname'"
arch="$tryArch"
Expand All @@ -28,7 +30,8 @@ case "$arch" in
amd64 | x86_64) found 'amd64' ;;
arm64 | aarch64) found 'arm64v8' ;;
armel) found 'arm32v5' ;;
armv7) found 'arm32v7' ;;
armv6*) found 'arm32v6' ;;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically, I could add arm32v5 here too, but I don't think we want to encourage arm32v5 users -- their time is just shy of completely up. 😅

armv7*) found 'arm32v7' ;;
i[3456]86 | x86) found 'i386' ;;
mips64el) found 'mips64le' ;; # TODO "uname -m" is just "mips64" (which is also "apk --print-arch" on big-endian MIPS) so we ought to disambiguate that somehow
ppc64el | ppc64le) found 'ppc64le' ;;
Expand Down