summaryrefslogtreecommitdiff
path: root/iencode.sh
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-11-26 19:31:12 -0500
committerAlex Xu <alex_y_xu@yahoo.ca>2013-11-26 19:31:12 -0500
commit9d86b215eb990ca52af89c94776dae24f4463e46 (patch)
treeb698cc173349883d2735e4154e392a4898b53d61 /iencode.sh
parentfb3d7df90cbfa8ed6e6fcde64404907b62928c0c (diff)
downloadhtml5ks-9d86b215eb990ca52af89c94776dae24f4463e46.tar.xz
html5ks-9d86b215eb990ca52af89c94776dae24f4463e46.zip
Stuff.
Diffstat (limited to 'iencode.sh')
-rwxr-xr-xiencode.sh32
1 files changed, 0 insertions, 32 deletions
diff --git a/iencode.sh b/iencode.sh
deleted file mode 100755
index ac898d7..0000000
--- a/iencode.sh
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-# configure cwebp location if not in PATH
-CWEBP=cwebp
-# configure flags
-CWEBP_FLAGS="-m 6"
-
-set -e
-
-cd $(dirname $0)/www/dump
-
-iencode() {
- EXT="$1"
- QUAL="$2"
- export EXT QUAL CWEBP CWEBP_FLAGS
- set -x
- find . -name \*."${EXT}" -print0 | xargs -0 -P ${THREADS} -n 1 bash -c '
- IN="$0"
- OUT="${IN%.${EXT}}.webp"
- [[ -f ${OUT} ]] || ${CWEBP} -q "${QUAL}" ${CWEBP_FLAGS} ${IN} -o ${OUT}
- '
-}
-
-iencode jpg 90
-iencode png 99
-
-if hash zopflipng; then
- find . -name \*.png -print0 | xargs -0 -I '{}' -P ${THREADS} zopflipng -m -y '{}' '{}'
-else
- echo >&2 "Install zopfli (https://code.google.com/p/zopfli/) to improve PNG compression."
- echo >&2 "KS 1.1 .png files reduce by ~2.6M (~1.6%) with -m, taking several hours."
-fi