/shlomif-settings/Bash/Themes/old-themes/riddles/sokoban/source.bash

https://bitbucket.org/shlomif/shlomif-computer-settings · BASH · 72 lines · 56 code · 13 blank · 3 comment · 2 complexity · 4c38a274a7245ec3bbbf62e5de306d4e MD5 · raw file

  1. load_common mymake
  2. load_common completion
  3. load_common prompt
  4. load_common hg
  5. # load_common gen_patch
  6. base="$HOME/progs/perl/Quizzes/quiz_of_the_week/hard-2008-12-28-sokoban"
  7. hg_base"$base"
  8. trunk="$base/trunk"
  9. modules_dir="$trunk/modules"
  10. soko_solve="$modules_dir/Shlomif-Sokoban-Solver"
  11. this="$soko_solve"
  12. remote_repo="$($__themes_dir/common/bitbucket-hg-remote-repo.pl --user="shlomif" --repo="sokoban_solver")"
  13. inst_modules_dir="$HOME/apps/perl/modules"
  14. modules_makefile="${build_scripts_dir}/Modules.mak"
  15. # Make sure that gvim's filename completion ignores filenames that it should
  16. # not edit.
  17. __dist_name()
  18. {
  19. (__check_for_distro &&
  20. cat META.yml | grep "^name:" | sed 's/^name: *//'
  21. )
  22. }
  23. __version()
  24. {
  25. (__check_for_distro &&
  26. cat META.yml | grep "^version:" | sed 's/^version: *//'
  27. )
  28. }
  29. __check_for_distro()
  30. {
  31. if [ -e "META.yml" ] ; then
  32. return 0
  33. else
  34. echo "Not a distro dir" 1>&2
  35. return 1
  36. fi
  37. }
  38. __test_distribution()
  39. {
  40. __check_for_distro &&
  41. (
  42. make disttest
  43. rm -fr "$(__dist_name)-$(__version)"
  44. )
  45. }
  46. __myctags()
  47. {
  48. ( cd "$this" && ctags -R )
  49. }
  50. cd $this
  51. prompt()
  52. {
  53. __prompt_cmd \
  54. "\$soko_solve=$soko_solve" \
  55. "\$trunk=$trunk" \
  56. "\$base=$base" \
  57. "~=$HOME"
  58. }
  59. PS1="\\u:\$(prompt)\\$ "