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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

grub.sh 2.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #!/bin/sh
  2. set -e
  3. if [ -f ./debian/rules ]; then
  4. echo "Running debuild clean and delete the old debian/rules now. "
  5. echo "Please run bootstrap again!"
  6. [ -f ./debian/changelog ] && debuild -d clean
  7. rm -f debian/rules
  8. exit 1
  9. fi
  10. if [ -f VERSION ]; then
  11. . ./VERSION
  12. else
  13. echo "No VERSION-File, exit!"
  14. exit 1
  15. fi
  16. if [ -f FLAVOUR ]; then
  17. . ./FLAVOUR
  18. else
  19. echo "No FLAVOUR-File, exit!"
  20. exit 1
  21. fi
  22. # clean up obsolete stuff
  23. rm -f debian/*.install \
  24. debian/*.ĺinks \
  25. debian/*.postinst \
  26. debian/*.postrm \
  27. debian/*.prerm \
  28. debian/*.preinst
  29. [ -d ./debian ] || exit 1
  30. if [ ! -e ./debian/changelog ]; then
  31. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  32. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  33. -e "s/\@VERSION\@/${VERSION}/g" \
  34. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  35. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  36. templates/debian/changelog \
  37. > ./debian/changelog
  38. fi
  39. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  40. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  41. -e "s/\@VERSION\@/${VERSION}/g" \
  42. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  43. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  44. templates/debian/${FLAVOUR}-control \
  45. > ./debian/control
  46. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  47. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  48. -e "s/\@VERSION\@/${VERSION}/g" \
  49. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  50. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  51. templates/debian/rules \
  52. > ./debian/rules
  53. chmod 755 ./debian/rules
  54. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  55. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  56. -e "s/\@VERSION\@/${VERSION}/g" \
  57. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  58. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  59. templates/debian/source/options \
  60. > ./debian/source/options
  61. rm -rf template
  62. cp -a templates/grub-theme/* .
  63. cp -f templates/grub-theme/Makefile .
  64. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  65. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  66. -e "s/\@VERSION\@/${VERSION}/g" \
  67. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  68. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  69. templates/debian/grub-theme.install \
  70. > ./debian/${NAME}-grub-theme.install
  71. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  72. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  73. -e "s/\@VERSION\@/${VERSION}/g" \
  74. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  75. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  76. templates/debian/live-grub-theme.install \
  77. > ./debian/${NAME}-live-grub-theme.install
  78. sed -e "s/\@CODENAME_SAFE\@/${NAME}/g" \
  79. -e "s/\@CODENAME\@/${DESCRIPTION}/g" \
  80. -e "s/\@VERSION\@/${VERSION}/g" \
  81. -e "s/\@FLAVOUR\@/${FLAVOUR}/g" \
  82. -e "s/\@DISPLAY\@/${DISPLAY}/g" \
  83. templates/debian/grub-theme.postinst \
  84. > ./debian/${NAME}-grub-theme.postinst