The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

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