-
Notifications
You must be signed in to change notification settings - Fork 315
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
Conversation
- 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
There was a problem hiding this 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" |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
Gonna go ahead and merge these. giflossy can be added back later if we want. Thanks! |
md5
/md5sum
andsvgo
md5sum
on systems which do not havemd5
--lossy
fromgifsicle
, as it is not a parameteron the program
-warn
frompngcrush
, as it is not a parameter onthe program