Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various cleanups of the make script. #336

Merged
merged 1 commit into from
Mar 20, 2019
Merged

Conversation

tgockel
Copy link
Contributor

@tgockel tgockel commented Mar 12, 2019

  • Adds checks for md5/md5sum and svgo
  • Fall back to md5sum on systems which do not have md5
  • Removes use of --lossy from gifsicle, as it is not a parameter
    on the program
  • Removes use of -warn from pngcrush, as it is not a parameter on
    the program

- Adds checks for `md5`/`md5sum` and `svgo`
- Fall back to `md5sum` on systems which do not have `md5`
- Removes use of `--lossy` from `gifsicle`, as it is not a parameter
  on the program
- Removes use of `-warn` from `pngcrush`, as it is not a parameter on
  the program
Copy link
Owner

@jmhobbs jmhobbs left a comment

Choose a reason for hiding this comment

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

Good stuff, just a couple points on gifsicle and pngcrush, open to suggestions.

if ! [ -f "$CACHE_FILE" ]; then
case ${FILE##*.} in
"gif")
gifsicle --lossy --optimize=3 "$FILE" > "$CACHE_FILE"
Copy link
Owner

Choose a reason for hiding this comment

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

So, I locally switched to the giflossy fork for that feature. Maybe we could feature detect on this?

;;
"jpg")
jpegtran -progressive -optimize -copy none -outfile "$CACHE_FILE" "$FILE"
;;
"png")
pngcrush -reduce -s -warn "$FILE" "$CACHE_FILE"
Copy link
Owner

Choose a reason for hiding this comment

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

For pngcrush I have 1.8.11, which has the -warn flag. This was added in 1.8.9 it appears, so may just be a versioning issue?

Copy link
Contributor Author

@tgockel tgockel Mar 14, 2019

Choose a reason for hiding this comment

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

It is a versioning thing...now 2.0 is out, so I'm upgraded (now).

Copy link
Owner

Choose a reason for hiding this comment

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

Is there a fork? I just checked homebrew and it's still 1.8.13, not seeing a 2.0 on the project page anywhere either.

@jmhobbs
Copy link
Owner

jmhobbs commented Mar 20, 2019

Gonna go ahead and merge these. giflossy can be added back later if we want.

Thanks!

@jmhobbs jmhobbs merged commit 3eacd52 into jmhobbs:master Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants