ccfn.in 600B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. . <(ffoom init)
  3. ffoo import core
  4. usage() {
  5. usage_is "[-I|--include module] [--] function [args...]"
  6. }
  7. includes=""
  8. FFOO_DEBUG=false
  9. while true; do
  10. case $1 in
  11. -d|--debug)
  12. FFOO_DEBUG=true
  13. shift 1
  14. ;;
  15. -I|--include)
  16. includes=$includes:$2
  17. shift 2
  18. ;;
  19. "")
  20. usage
  21. ;;
  22. --)
  23. shift 1
  24. break
  25. ;;
  26. *)
  27. break;
  28. ;;
  29. esac;
  30. done
  31. for i in $(tr ":" " " <<<"$includes"); do
  32. ffoo import $i
  33. done
  34. "$@"