Closed sech1p closed 3 years ago
Hey Tsuki, thanks for the PR!
I see that this PR is using some external commands (sysctl
, awk
, cut
, date
, uname
, port
, hostname
), but sadly the whole reason this project was made was a challenge to see if I could make a fetch without external commands.
Nice work, but (in its current state) this PR doesn't seem to fit the goal of the project, sorry! It would be terrific if you could find a way around those commands, though. But I'm not sure if macOS has that info in files anywhere.
Hey Tsuki, thanks for the PR!
I see that this PR is using some external commands (
sysctl
,awk
,cut
,date
,uname
,port
,hostname
), but sadly the whole reason this project was made was a challenge to see if I could make a fetch without external commands.Nice work, but (in its current state) this PR doesn't seem to fit the goal of the project, sorry! It would be terrific if you could find a way around those commands, though. But I'm not sure if macOS has that info in files anywhere.
alright, my mistake, i will fix it tomorrow
I think that e.g. hostname can be replaced by $HOSTNAME
variable (same as awk
and cut
) but /proc
-related things rather not, because sysctl
is the only one method to communicate with Mach kernel
alright, my mistake, i will fix it tomorrow 👍
I think that e.g. hostname can be replaced by
$HOSTNAME
variable Sadly not, as that's a bashism.
- bash uses HOSTNAME
- zsh uses HOST
- dash/mksh/mrsh/oksh have no alternative
sysctl is the only one method to communicate with [the Mac] kernel Ah, that's a shame. I think I ran into this issue when I was doing the initial macos "support", but I don't own a mac so I didn't really look that hard.
Sadly not, as that's a bashism. - bash uses HOSTNAME - zsh uses HOST - dash/mksh/mrsh/oksh have no alternative
sh
on Mac works with HOSTNAME
env
no progress in roughly a month; closing
F
should works
proof: