cookutils diff modules/compressor @ rev 1077
lighttpd/cooker.css: revert main h2 line height, carry this style to #hdr h2 only; lighttpd/index.cgi: add link to Tank RRD Stats in the footer; package -> files: display SUID files in violet color
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Jun 13 14:14:45 2018 +0300 (2018-06-13) |
parents | c1db2b6009d0 |
children | 1463d32f6f90 |
line diff
1.1 --- a/modules/compressor Wed Jun 06 13:32:26 2018 +0300 1.2 +++ b/modules/compressor Wed Jun 13 14:14:45 2018 +0300 1.3 @@ -366,11 +366,11 @@ 1.4 1.5 action 'Compressing svg images...' 1.6 1.7 + the_log="$(mktemp)" 1.8 if which svgcleaner >/dev/null; then 1.9 [ "${COOKOPTS/!svgextra/}" == "$COOKOPTS" ] && 1.10 opts="--apply-transform-to-paths yes --coordinates-precision 1 --paths-coordinates-precision 1" 1.11 1.12 - the_log="$(mktemp)" 1.13 for i in $(IFS=$'\n' find $install -type f -name '*.svg'); do 1.14 out="$(unset IFS; svgcleaner "$i" "$i" --copy-on-error --quiet \ 1.15 --multipass --remove-unresolved-classes no $opts 2>&1)" 1.16 @@ -396,16 +396,21 @@ 1.17 1.18 action 'Compressing gif images...' 1.19 1.20 + the_log="$(mktemp)" 1.21 if which gifsicle >/dev/null; then 1.22 - the_log="$(mktemp)" 1.23 IFS=$'\n' 1.24 for i in $(find $install -type f -name '*.gif'); do 1.25 - unset IFS 1.26 - # use intermediate file, if all well ($?=0), then substitute the original 1.27 - if gifsicle -O3 "$i" -o "$i.$$" >> "$the_log" 2>&1; then 1.28 - if [ -s "$i.$$" ]; then mv "$i.$$" "$i"; fi 1.29 - else 1.30 - rm "$i.$$" 1.31 + if ! cached_path=$(query_cache gif "$i"); then 1.32 + unset IFS 1.33 + # use intermediate file, if all well ($?=0), then substitute the original 1.34 + if gifsicle -O3 "$i" -o "$i.$$" >> "$the_log" 2>&1; then 1.35 + if [ -s "$i.$$" ]; then 1.36 + mv "$i.$$" "$i" 1.37 + store_cache "$cached_path" "$i" 1.38 + fi 1.39 + else 1.40 + rm "$i.$$" 1.41 + fi 1.42 fi 1.43 done 1.44 else 1.45 @@ -428,11 +433,11 @@ 1.46 1.47 action 'Compressing ui files...' 1.48 1.49 + the_log="$(mktemp)" 1.50 if which xmlstarlet >/dev/null; then 1.51 size0=$(sizes xml) 1.52 time0=$(get_time) 1.53 temp_ui="$(mktemp)" 1.54 - the_log="$(mktemp)" 1.55 IFS=$'\n' 1.56 for ui in $(find $install -type f \( -name '*.ui' -o -name '*.glade' \) ); do 1.57 out="$(xmlstarlet c14n --without-comments "$ui" | xmlstarlet sel -B -t -c '*' > "$temp_ui")"