A haskell IRC bot because who doesn't need one
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.

33 lines
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