kanflo / opendps

Give your DPS5005 the upgrade it deserves
MIT License
892 stars 124 forks source link

make docker build_binaries.sh macOS compatible #227

Closed frederikvs closed 3 years ago

frederikvs commented 3 years ago

On my macbook build_binaries.sh didn't work :

readlink: illegal option -- f
usage: readlink [-n] [file ...]

Turns out that readlink is something slightly different here :

STAT(1)                   BSD General Commands Manual                  STAT(1)

NAME
     readlink, stat -- display file status

[...]

     -f format
             Display information using the specified format.  See the FORMATS
             section for a description of valid formats.

However, regarding the -f flag that is used, the readlink man page for linux also mentions

realpath(1) is the preferred command to use for canonicalization functionality.

And that command also works on macOS :-)

guillaumelecerf commented 3 years ago

Maybe you should change .travis.yml accordingly for consistency.

frederikvs commented 3 years ago

good point @guillaumelecerf , I wasn't aware it was being used in different places. .travis.yml has also been updated, and a quick grep shows that there are no other places where readlink -f was being used.

kanflo commented 3 years ago

Thanks!