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.

67 lines
2.0 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-SrcTar
  11. # ROCK Linux is Copyright (C) 1998 - 2003 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. eval "`grep -A 10 '\[BEGIN\]' scripts/parse-config | grep -B 10 '\[END\]'`"
  25. echo -n 'Creating source tar ... '
  26. # Create temp source base dir
  27. #
  28. src="`mktemp -d -p $PWD src.srctar.XXXXXXXXXX`"
  29. rm -rf $src/rock-src-$rockver
  30. mkdir -p $src/rock-src-$rockver
  31. #
  32. echo "ROCK Linux $rockver" > $src/rock-src-$rockver/VERSION
  33. #
  34. for x in README COPYING scripts target misc \
  35. package architecture Documentation
  36. do
  37. [ -d $x ] && ln -s ../../$x $src/rock-src-$rockver/$x
  38. [ -f $x ] && cp -a $x $src/rock-src-$rockver/$x
  39. done
  40. #
  41. mkdir -p $src/rock-src-$rockver/download
  42. if [ ! -f download/INDEX ] ; then
  43. echo -e "\nFile \"download/INDEX\" not found."
  44. echo "Running \"./scripts/Puzzle\" to generate it.";\
  45. ./scripts/Puzzle;
  46. fi
  47. cp download/INDEX $src/rock-src-$rockver/download/
  48. # Create tar file
  49. #
  50. (
  51. cd $src
  52. tar --use-compress-program=bzip2 --owner root --group root \
  53. --exclude .svn --exclude CVS \
  54. -cf - rock-src-$rockver/*/* rock-src-$rockver/[CRV]*
  55. ) > ${1:-rock-src-$rockver.tar.bz2}
  56. # Done.
  57. #
  58. rm -rf $src/
  59. du -sh ${1:-rock-src-$rockver.tar.bz2} | tr '\t' ' '