mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

60 lines
1.7 KiB

  1. #!/bin/bash
  2. #
  3. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  4. #
  5. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  6. # Please add additional copyright information _after_ the line containing
  7. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  8. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  9. #
  10. # ROCK Linux: rock-src/scripts/create-cache.sh
  11. # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
  12. #
  13. # This program is free software; you can redistribute it and/or modify
  14. # it under the terms of the GNU General Public License as published by
  15. # the Free Software Foundation; either version 2 of the License, or
  16. # (at your option) any later version. A copy of the GNU General Public
  17. # License can be found at Documentation/COPYING.
  18. #
  19. # Many people helped and are helping developing ROCK Linux. Please
  20. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  21. # file for details.
  22. #
  23. # --- ROCK-COPYRIGHT-NOTE-END ---
  24. if [ "$#" != 5 ] ; then
  25. echo "Usage: $0 <rockver> <buildtime> <stage> <pkg> <var-adm-dir>" >&2
  26. exit 1
  27. fi
  28. rockver=$1
  29. buildtime=$2
  30. stagelevel=$3
  31. pkg=$4
  32. varadm=$5
  33. LC_ALL=C date '+%n[TIMESTAMP] %s %c'
  34. echo -e "[ROCKVER] $rockver\n"
  35. echo "[LOGS]" $( cd ${varadm}/logs ; ls ?-$pkg.* )
  36. echo
  37. if [ -f "${varadm}/logs/$stagelevel-$pkg.log" ]
  38. then
  39. echo "[BUILDTIME] $buildtime ($stagelevel)"
  40. echo "[SIZE] `grep "^Package Size: " \
  41. ${varadm}/packages/$pkg | cut -f3- -d' '`"
  42. echo
  43. cut -f2- -d' ' "${varadm}/dependencies/$pkg" |
  44. fmt -70 | sed 's,^,[DEP] ,'
  45. echo
  46. fi
  47. for stagelevel in 0 1 2 3 4 5 6 7 8 9 ; do
  48. if [ -f "${varadm}/logs/$stagelevel-$pkg.err" ] ; then
  49. tail -n 50 "${varadm}/logs/$stagelevel-$pkg.err" | \
  50. sed "s,^,[$stagelevel-ERROR] ,"
  51. echo
  52. fi
  53. done