neverpanic / google-font-download

Locally host Google's web fonts
https://neverpanic.de/blog/2014/03/19/downloading-google-web-fonts-for-local-hosting/
BSD 2-Clause "Simplified" License
706 stars 72 forks source link

Seemed like this didn't want to work on OS X #18

Closed MikeiLL closed 6 years ago

MikeiLL commented 6 years ago

Ran make and got a bunch of error messages, but now they're lost. I had forgotten about it and went another route, but came across again in left-open browser window.

Should this work on OS X?

Thanks much, man.

neverpanic commented 6 years ago

Yes, this works on macOS (as it was developed there). You don't need to run make, though, since it will only run the tests. You can directly run the script.

beaumartinez commented 5 years ago

I'm on macOS and with the default getopt and grep it doesn't work out of the box. You can install GNU getopt and grep and use those though (brew install gnu-getopt grep and follow the caveats to add those to your PATH).

neverpanic commented 5 years ago

The script does require Bash 4.x, which is not preinstalled on macOS. However, with Bash 4.x, it does not need any other extra tools (although you might get a warning on getopt):

$> PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin /opt/local/bin/bash ~/Development/google-font-download/google-font-download "'Open Sans:300'"
Warning: Old getopt(1) detected.

Your version of getopt(1) does not correctly deal with whitespace and does not support long options. You may have to quote any special character arguments twice. For
example, to download the 'Open Sans' font, use /Users/clemens/Development/google-font-download/google-font-download "'Open Sans'". See
https://github.com/neverpanic/google-font-download/issues/1 for more information.

You should consider upgrading to a more modern version of getopt(1).

Downloading Open Sans:300...woff2 woff eot svg ttf