A haskell IRC bot because who doesn't need one
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

33 lignes
572B

  1. #!/bin/sh
  2. usage() {
  3. echo Usage: $0 '[run|build|watch|clean]'
  4. }
  5. if ! command -v tup >/dev/null; then
  6. echo Error: You need tup installed: http://gittup.org/tup/ >&2
  7. exit 1
  8. fi
  9. export CWD="$(readlink -f .)"
  10. case $1 in
  11. run)
  12. $0 build >&2 || exit 1
  13. echo '' >&2 && ./Main
  14. ;;
  15. watch)
  16. tup monitor -f -a -j2 >&2
  17. ;;
  18. build)
  19. tup init 2>/dev/null
  20. tup >&2
  21. ;;
  22. clean)
  23. rm -f Main *.o *.hi IRC/*.o IRC/*.hi IRC/Plugins/*.o IRC/Plugins/*.hi
  24. ;;
  25. *)
  26. usage
  27. ;;
  28. esac