No Description
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.

hi-setup 664B

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/sh
  2. #
  3. # pbrisbin 2014 - Generate a package skeleton using hi and a custom template,
  4. # then execute some additional setup.
  5. #
  6. ###
  7. set -e
  8. info() { printf "==> %s\n" "$*"; }
  9. if [ $# -lt 2 ]; then
  10. printf "usage: hi-setup <module> <package> [hi options]\n" >&2
  11. exit 64
  12. fi
  13. module="$1"
  14. package="$2"
  15. shift 2
  16. info "Generating package skeleton..."
  17. hi \
  18. --module-name "$module" \
  19. --package-name "$package" \
  20. --author 'Pat Brisbin' \
  21. --email 'pbrisbin@gmail.com' \
  22. --repository gh:pbrisbin/hi-hspec "$@"
  23. rm ./README.md
  24. cd "$package"
  25. info "Initializing sandbox..."
  26. cabal sandbox init
  27. cabal install --enable-tests --dependencies-only -j4
  28. info "Done."