Permalink
Browse files

[scripts] small changes

fix the html output of pack - remove extraneous ','

AnalyseLog must account for the total message output
at the start of rendering and not just show 100% completion
before anything has started.

Signed-off-by: Christopher Hall <hsw@openmoko.com>
  • Loading branch information...
1 parent 9132ba9 commit eaf9fbb0b28075755555f3a6e73319b76f767f5e @hxw hxw committed Oct 27, 2010
Showing with 29 additions and 11 deletions.
  1. +3 −1 scripts/AnalyseLog
  2. +26 −10 scripts/pack
View
@@ -198,7 +198,9 @@ function seconds_to_string(elapsed_time, hours, minutes, seconds) {
if (p1 > 0 && p2 > 0) {
i = substr($0, p1 + 1, p2 - p1 - 1)
if ("Total:" == $2) {
- render_count[i] = $3
+ if (0 != render_max[i]) {
+ render_count[i] = $3
+ }
render_max[i] = $3
} else {
render_time[i] += $2
View
@@ -243,22 +243,30 @@ case "${direct}" in
do
part=$((${part} + 1))
file=$(basename "${p}")
- HTMLoutput 4 '<a href="'${url}/${file}'">Part '${part}'</a>,'
+ [ "${part}" -ne 1 ] && HTMLoutput 4 ', '
+ HTMLoutput 4 '<a href="'${url}/${file}'">Part '${part}'</a>'
done
- HTMLoutput 4 ') '
+ HTMLoutput 4 ') torrent: ('
;;
*)
;;
esac
-HTMLoutput 4 ' torrent: ('
+HTMLoutput 4 ' '
part=0
for p in "${archive}"*
do
part=$((${part} + 1))
file=$(basename "${p}")
- HTMLoutput 4 '<a href="'${url}/${file}'?torrent">Part '${part}'</a>,'
+ [ "${part}" -ne 1 ] && HTMLoutput 4 ', '
+ HTMLoutput 4 '<a href="'${url}/${file}'?torrent">Part '${part}'</a>'
done
-HTMLoutput 4 ')'
+case "${direct}" in
+ [yY]|[yY][eE][sS])
+ HTMLoutput 4 ')'
+ ;;
+ *)
+ ;;
+esac
HTMLoutput 2 '</li>'
@@ -300,23 +308,31 @@ do
do
part=$((${part} + 1))
file=$(basename "${p}")
- HTMLoutput 4 '<a href="'${url}/${file}'">Part '${part}'</a>,'
+ [ "${part}" -ne 1 ] && HTMLoutput 4 ', '
+ HTMLoutput 4 '<a href="'${url}/${file}'">Part '${part}'</a>'
done
- HTMLoutput 4 ')'
+ HTMLoutput 4 ')torrent: ('
;;
*)
;;
esac
- HTMLoutput 4 ' torrent: ('
+ HTMLoutput 4 ' '
part=0
for p in "${archive}"*
do
part=$((${part} + 1))
file=$(basename "${p}")
- HTMLoutput 4 '<a href="'${url}/${file}'?torrent">Part '${part}'</a>,'
+ [ "${part}" -ne 1 ] && HTMLoutput 4 ', '
+ HTMLoutput 4 '<a href="'${url}/${file}'?torrent">Part '${part}'</a>'
done
- HTMLoutput 4 ')'
+ case "${direct}" in
+ [yY]|[yY][eE][sS])
+ HTMLoutput 4 ')'
+ ;;
+ *)
+ ;;
+ esac
HTMLoutput 2 '</li>'
done

0 comments on commit eaf9fbb

Please sign in to comment.