sde-commit: Changed commit message generator to use pkg: instead of [pkg]
[opensde-nopast.git] / scripts / create-cache.sh
blob06ef44f98d2bf5ba870dcea3180399e6e4e602fb
1 #!/bin/bash
3 # --- T2-COPYRIGHT-NOTE-BEGIN ---
4 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
6 # T2 SDE: scripts/create-cache.sh
7 # Copyright (C) 2004 - 2006 The T2 SDE Project
8 # Copyright (C) 1998 - 2003 Clifford Wolf
10 # More information can be found in the files COPYING and README.
12 # This program is free software; you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation; version 2 of the License. A copy of the
15 # GNU General Public License can be found in the file COPYING.
16 # --- T2-COPYRIGHT-NOTE-END ---
18 if [ "$#" != 5 ] ; then
19 echo "Usage: $0 <sdever> <buildtime> <stage> <pkg> <var-adm-dir>" >&2
20 exit 1
23 sdever=$1
24 buildtime=$2
25 stagelevel=$3
26 pkg=$4
27 varadm=$5
29 LC_ALL=C date '+%n[TIMESTAMP] %s %c'
30 echo -e "[ROCKVER] $sdever\n"
32 echo "[LOGS]" $( cd ${varadm}/logs ; ls ?-$pkg.* )
33 echo
35 if [ -f "${varadm}/logs/$stagelevel-$pkg.log" ]
36 then
37 echo "[BUILDTIME] $buildtime ($stagelevel)"
38 echo "[SIZE] `grep "^Package Size: " \
39 ${varadm}/packages/$pkg | cut -f3- -d' '`"
40 echo
42 cut -f2- -d' ' "${varadm}/dependencies/$pkg" |
43 fmt -70 | sed 's,^,[DEP] ,'
44 echo
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
53 done