bghtml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Make HTML files that will point to the right GIF files.
  2. # Usage: bghtml file file file....
  3. #
  4. # Hacked into existence by Larry McVoy (lm@sun.com now lm@sgi.com).
  5. # Copyright (c) 1995 Larry McVoy. GPLed software.
  6. # $Id$
  7. eval 'exec perl -Ss $0 "$@"'
  8. if 0;
  9. $bar = 0;
  10. for ($i = 0; $i <= $#ARGV; ++$i) {
  11. $file = $ARGV[$i]; $file =~ s|tmp/||; $file =~ s|.bg$||;
  12. if ($i > 0) {
  13. $prev = $ARGV[$i - 1];
  14. $prev =~ s|tmp/||;
  15. $prev =~ s|.bg$||;
  16. $prev_html = "${prev}.html";
  17. }
  18. if ($i < $#ARGV) {
  19. $next = $ARGV[$i + 1];
  20. $next =~ s|tmp/||;
  21. $next =~ s|.bg$||;
  22. $next_html = "${next}.html";
  23. }
  24. $name = "HTML/${file}.html";
  25. open(F, ">$name");
  26. print F "<a href=${file}.8>Man page for this benchmark</a><p>\n";
  27. $str = sprintf("<IMG SRC=\"bar%02d\">\n", ++$bar);
  28. print F "$str<p>";
  29. print F "<a href=lmbench-toc.html><img src=\"gifs/arrows/b_arrow.gif\"</a>\n";
  30. print F "<a href=lmbench-S-6.html><img src=\"gifs/graph.gif\"</a>\n";
  31. print F "<a href=${prev_html}><img src=\"gifs/arrows/back.gif\"</a>\n"
  32. if $i > 0;
  33. print F "<a href=${next_html}><img src=\"gifs/arrows/forward.gif\"</a>\n"
  34. if $i < $#ARGV;
  35. close(F);
  36. }
  37. exit 0;