OpenSDE Framework (without history before r20070)
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.

68 lines
2.1 KiB

  1. #!/bin/sh
  2. # --- T2-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # T2 SDE: misc/archive/PackBuildInfo.sh
  6. # Copyright (C) 2004 - 2006 The T2 SDE Project
  7. #
  8. # More information can be found in the files COPYING and README.
  9. #
  10. # This program is free software; you can redistribute it and/or modify
  11. # it under the terms of the GNU General Public License as published by
  12. # the Free Software Foundation; version 2 of the License. A copy of the
  13. # GNU General Public License can be found in the file COPYING.
  14. # --- T2-COPYRIGHT-NOTE-END ---
  15. config=default
  16. if [ "$1" == "-cfg" ]; then
  17. config=$2; shift; shift
  18. fi
  19. if [ ! -f config/$config/config ]; then
  20. echo "ERROR: $config not found!"
  21. exit 1
  22. fi
  23. eval `grep "SDECFG_ID=" config/$config/config`
  24. if [ -z "$SDECFG_ID" -o ! -d build/$SDECFG_ID/var/adm/logs/ ]; then
  25. echo "ERROR: '$SDECFG' is not a valid build id!"
  26. exit 2
  27. fi
  28. tmpdir=`mktemp -d`
  29. rev=`svn info | sed -n 's,^Revision: \(.*\),\1,p'`
  30. mkdir -p $tmpdir/{config,cache,errlogs,flist} # logs
  31. echo "INFO: backuping configuration of $config ..." 1>&2
  32. cp -av config/$config/* $tmpdir/config/
  33. echo "INFO: creating build summary ..." 1>&2
  34. ./scripts/Create-ErrList -cfg $config 2>&1 | tee $tmpdir/summary
  35. echo "INFO: adding cache files ..." 1>&2
  36. #for x in $( cd build/$SDECFG_ID/var/adm/cache; ls -1 ); do
  37. # [ -s build/$SDECFG_ID/var/adm/cache/$x ] && \
  38. # cp build/$SDECFG_ID/var/adm/cache/$x $tmpdir/cache/
  39. cp build/$SDECFG_ID/var/adm/cache/* $tmpdir/cache/
  40. #done
  41. echo "INFO: adding log files ..." 1>&2
  42. #for x in $( cd build/$SDECFG_ID/var/adm/logs; ls -1 ); do
  43. # if [ -s build/$SDECFG_ID/var/adm/logs/$x ]; then
  44. # [[ $x == *.out ]] && continue
  45. # cp build/$SDECFG_ID/var/adm/logs/$x $tmpdir/logs/
  46. cp build/$SDECFG_ID/var/adm/logs/*.err $tmpdir/errlogs/
  47. # [[ $x == *.err ]] && ln -s ../logs/$x $tmpdir/errlogs/$x
  48. # fi
  49. #done
  50. echo "INFO: adding flist files ..." 1>&2
  51. #for x in $( cd build/$SDECFG_ID/var/adm/flists; ls -1 ); do
  52. # [ -s $x ] && cp build/$SDECFG_ID/var/adm/flists/$x $tmpdir/flist/
  53. cp build/$SDECFG_ID/var/adm/flists/* $tmpdir/flist/
  54. #done
  55. tar -C $tmpdir -jcf cachepack-$config-opensde-r${rev:-0}.tar.bz2 .
  56. rm -rf $tmpdir