Date:2010-08-31 02:05:25 (9 years 7 months ago)
Author:Werner Almesberger
Commit:6260614015a181b643670109d65b6e921a90e1e8
Message:Reduce the number of I/O redirections.

- scripts/schhist2web: instead of having many >>"$index", just put one at
the enclosing construct
Files: scripts/schhist2web (4 diffs)

Change Details

scripts/schhist2web
360360        s="$s<TD>"
361361        continue
362362    fi
363    echo "$s" >>"$index"
363    echo "$s"
364364    s=
365365    empty=false
366        wrapped_png "$out" "$next" "$m" >>"$index"
366        wrapped_png "$out" "$next" "$m"
367367    done < <(ls -1 "$out/names")
368368    if ! $empty; then
369     echo "$s<TD valign=\"middle\">" >>"$index"
370    commit_entry "$dir" $next >>"$index"
369     echo "$s<TD valign=\"middle\">"
370    commit_entry "$dir" $next
371371    fi
372372    next=$n
373done
373done >>"$index"
374374
375375
376376# --- Add creation entries for all files in the first commit ------------------
...... 
378378
379379if [ -d "$cache/ppm_$next" ]; then # could this ever be false ?
380380    empty=true
381    echo "<TR>" >>"$index"
381    echo "<TR>"
382382    mkdir -p "$out/diff_$next" "$out/thumb_$next"
383383    while read m; do
384384    ppm="$cache/ppm_$next/$m.ppm"
...... 
386386    diff="$out/diff_$next/$m.png"
387387    thumb="$out/thumb_$next/$m.png"
388388
389    echo "<TD>" >>"$index"
389    echo "<TD>"
390390    [ -f "$ppm" ] || continue
391391    pngdiff cat "$diff" -f -c 0,1,0 "$ppm" "$ppm" || exit
392392    pngdiff shrink "$thumb" -f $THUMB_OPTS -c 0,1,0 "$fat" "$fat" \
...... 
395395    mkdir -p "$out/pdf_$next"
396396    schps2pdf -T NEW -o "$out/pdf_$next/$m.pdf" \
397397      "$cache/ps_$next/$m.ps" || exit
398    wrapped_png "$out" "$next" "$m" >>"$index"
398    wrapped_png "$out" "$next" "$m"
399399    done < <(ls -1 "$out/names")
400400    if ! $empty; then
401     echo "<TD valign=\"middle\">" >>"$index"
402    commit_entry "$dir" $next >>"$index"
401     echo "<TD valign=\"middle\">"
402    commit_entry "$dir" $next
403403    fi
404fi
404fi >>"$index"
405405
406406
407407# --- Finish ------------------------------------------------------------------

Archive Download the corresponding diff file



interactive