PageRenderTime 45ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/shlomif-settings/Bash/Themes/themes/perl/mozbot/source.bash

https://bitbucket.org/shlomif/shlomif-computer-settings
BASH | 120 lines | 98 code | 19 blank | 3 comment | 7 complexity | 47f8b24ded537131ec8061777ae2f93e MD5 | raw file
  1. load_common mymake
  2. load_common completion
  3. load_common prompt
  4. load_common sys
  5. # load_common gen_patch
  6. base="$HOME/progs/perl/net/irc/bots/mozbot"
  7. hg="$base/mozbot"
  8. trunk="$hg"
  9. cvs="$base/cvssrc/mozbot"
  10. # Make sure that gvim's filename completion ignores filenames that it should
  11. # not edit.
  12. __dist_name()
  13. {
  14. (__check_for_distro &&
  15. cat META.yml | grep "^name:" | sed 's/^name: *//'
  16. )
  17. }
  18. __version()
  19. {
  20. (__check_for_distro &&
  21. cat META.yml | grep "^version:" | sed 's/^version: *//'
  22. )
  23. }
  24. __check_for_distro()
  25. {
  26. if [ -e "META.yml" ] ; then
  27. return 0
  28. else
  29. echo "Not a distro dir" 1>&2
  30. return 1
  31. fi
  32. }
  33. __test_distribution()
  34. {
  35. __check_for_distro &&
  36. (
  37. make disttest
  38. rm -fr "$(__dist_name)-$(__version)"
  39. )
  40. }
  41. __myctags()
  42. {
  43. (
  44. cd "$trunk" && \
  45. ctags -f tags --recurse --totals \
  46. --exclude='**/.hg/**' \
  47. --exclude='*~' \
  48. --languages=Perl --langmap=Perl:+.t
  49. )
  50. }
  51. cd $this
  52. __install_to_temp()
  53. {
  54. (
  55. make -f "$modules_makefile" "$(pwd)"
  56. )
  57. }
  58. __prepare_install_all_to_temp_makefile()
  59. {
  60. (cd "$build_scripts_dir" && perl create-makefile.pl)
  61. }
  62. __install_all_to_temp()
  63. {
  64. target="$1"
  65. shift
  66. make_params=""
  67. if [ "$target" == "runtest" ] ; then
  68. make_params="$make_params TEST_TARGET=runtest"
  69. fi
  70. (
  71. make -f "$modules_makefile" all $make_params
  72. )
  73. }
  74. prompt()
  75. {
  76. __prompt_cmd \
  77. "\$hg=$hg" \
  78. "\$base=$base" \
  79. "~=$HOME"
  80. }
  81. check()
  82. {
  83. (cd "$trunk" && perl -cT mozbot.pl)
  84. }
  85. run()
  86. {
  87. (cd "$trunk" && perl -T mozbot.pl)
  88. }
  89. c()
  90. {
  91. check "$@"
  92. }
  93. Pu()
  94. {
  95. (
  96. cd "$trunk"
  97. _sys hg push 'ssh://hg@bitbucket.org/shlomif/mozbot-shlomif'
  98. )
  99. }
  100. proj_name='mozbot'
  101. cd "$trunk"