This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# shellcheck disable=SC3043 | |
set -e | |
set -u | |
#(set -o | grep -q pipefail) && set -o pipefail | |
#(set -o | grep -q posix) && set -o posix | |
#shopt -s failglob | |
#set -x | |
# Compute the most optimal (file size) format for an input image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eu | |
# requires jpeg-recompress <https://github.com/danielgtaylor/jpeg-archive> | |
# same as jpeg-archive, but: | |
# * without 3rd-party dependencies | |
# * can re-compress a single file as well as a directory | |
# * replaces original with optimized version (keeping file timestamps) | |
# * no support for RAW images |