The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
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.
 
 
 
 

30 lines
1.0 KiB

  1. #!/bin/bash
  2. #
  3. # Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/
  4. #
  5. # Write a constant value to stdout.
  6. #
  7. # This will only ever write the constant value to stdout if it can successfully be read.
  8. # If the constant can be read, its value is printed with the .toString() method.
  9. # If an error occurs, nothing is written to stdout, and the error will be written to stderr.
  10. # If the value of the constant is null, nothing is printed to stdout, and "null" is printed to stderr.
  11. #
  12. # Usage:
  13. #
  14. # bconst classAndMember
  15. #
  16. # classAndMember : the full name of a Java class, followed by a dot and the constant member name
  17. #
  18. # For example:
  19. #
  20. # bconst bubble.ApiConstants.ROOT_NETWORK_UUID
  21. #
  22. SCRIPT="${0}"
  23. SCRIPT_DIR="$(cd "$(dirname "${SCRIPT}")" && pwd)"
  24. . "${SCRIPT_DIR}"/bubble_common
  25. CLASS_AND_MEMBER="${1:?sole param should be something like: bubble.pkg.SomeClass.SOME_CONSTANT}"
  26. shift
  27. BUBBLE_QUIET=1 exec ${SCRIPT_DIR}/bubble const "${CLASS_AND_MEMBER}" "${@}"