Use uname -m over uname --processor #13

Merged
r33int merged 3 commits from master into master 2020-02-24 22:13:54 +01:00
r33int commented 2020-02-24 21:50:05 +01:00 (Migrated from github.com)

uname -m seems to be more accurate. On some platforms, uname --processor returns "unknown".

image

image

uname -m seems to be more accurate. On some platforms, uname --processor returns "unknown". ![image](https://user-images.githubusercontent.com/22567851/75189900-8003ff80-574f-11ea-9dc3-e14ab7451fc4.png) ![image](https://user-images.githubusercontent.com/22567851/75189934-927e3900-574f-11ea-8cdc-8a2f34f00edd.png)
bc1bb commented 2020-02-24 22:01:14 +01:00 (Migrated from github.com)

Your way to do wouldn't work, let me explain:
I use --processor only in case it exists (iOS Native Shell), that's why I use if [ "$(uname --processor)" ], because it'll return false if it doesnt exist and so automatically use uname -m as per the if statement, but if you do if [ "$(uname -m)" ] it'll always return true as uname -m exists everywhere as far as I know.
It would be better to test if it exist and then it is unknown (why do people implements so useless things ffs).
But anyways thanks for this Pull Request 👍

Your way to do wouldn't work, let me explain: I use `--processor` only in case it exists (iOS Native Shell), that's why I use `if [ "$(uname --processor)" ]`, because it'll return false if it doesnt exist and so automatically use `uname -m` as per the if statement, but if you do `if [ "$(uname -m)" ]` it'll always return true as `uname -m` exists everywhere as far as I know. It would be better to test if it exist and then it is `unknown` (why do people implements so useless things ffs). But anyways thanks for this Pull Request 👍
r33int commented 2020-02-24 22:12:20 +01:00 (Migrated from github.com)

LGTM

LGTM
bc1bb commented 2020-02-24 22:13:48 +01:00 (Migrated from github.com)

Yes thank you 👍

Yes thank you 👍
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
bc1bb/info.sh!13
No description provided.