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.

52 lines
808 B

  1. #!/bin/bash
  2. ## compose: no-hooks
  3. if [ -z "$SERVICE_DATASTORE" ]; then
  4. echo "This script is meant to be run through 'compose' to work properly." >&2
  5. exit 1
  6. fi
  7. . "$CHARM_PATH/lib/common"
  8. version=0.1
  9. usage="$exname [-h|--help]"
  10. help="
  11. USAGE:
  12. $usage
  13. DESCRIPTION:
  14. Generate website from current content.
  15. EXAMPLES:
  16. $exname
  17. "
  18. dbname=
  19. output=
  20. while [ "$1" ]; do
  21. case "$1" in
  22. "--help"|"-h")
  23. print_help >&2
  24. exit 0
  25. ;;
  26. --*|-*)
  27. err "Unexpected optional argument '$1'"
  28. print_usage >&2
  29. exit 1
  30. ;;
  31. *)
  32. err "Unexpected positional argument '$1'"
  33. print_usage >&2
  34. exit 1
  35. ;;
  36. esac
  37. shift
  38. done
  39. hugo:generate "$HOST_HUGO_SOURCE" "$HOST_HUGO_OUTPUT"