The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 

29 行
748 B

  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. # Set up python venv to run scripts in bin
  6. #
  7. function die {
  8. echo 1>&2 "$0: ${1}"
  9. exit 1
  10. }
  11. BUBBLE_HOME="$(cd "$(dirname "${0}")"/.. && pwd)"
  12. cd "${BUBBLE_HOME}" || die "Error changing to ${BUBBLE_HOME} dir"
  13. if [[ ! -d "${BUBBLE_HOME}/.venv" ]] ; then
  14. python3 -m venv ./.venv || die "Error creating venv"
  15. fi
  16. . "${BUBBLE_HOME}"/.venv/bin/activate || die "Error activating bubble venv"
  17. python3 -m pip install requests || die "Error installing pip packages"
  18. if [[ -n "${1}" ]] ; then
  19. script=${1}
  20. shift
  21. echo python3 "${script}" "${@}"
  22. else
  23. echo "venv successfully set up"
  24. fi