The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

26 linhas
881 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. # Wrap rsync with options to use port 1202, the standard Bubble SSH port.
  6. # If your rsync command already contains a `-e` or `--rsh` option, this wrapper will not work.
  7. #
  8. # Environment variables:
  9. #
  10. # BUBBLE_SSH_PORT : If set, this port will be used instead of 1202
  11. #
  12. SCRIPT="${0}"
  13. SCRIPT_DIR="$(cd "$(dirname "${SCRIPT}")" && pwd)"
  14. . "${SCRIPT_DIR}"/bubble_common
  15. if [[ -z "${BUBBLE_SSH_PORT}" ]] ; then
  16. BUBBLE_SSH_PORT="1202"
  17. fi
  18. if [[ $(echo "${@}" | grep -c -- "-e ") -gt 0 || $(echo "${@}" | grep -c -- "--rsh") -gt 0 ]] ; then
  19. die "$0 does not work correctly when -e or --rsh is used, since it sets its own: ${@}"
  20. fi
  21. RSYNC_SSH_OPTS="$(which ssh) -p ${BUBBLE_SSH_PORT}"
  22. rsync -e "${RSYNC_SSH_OPTS}" "${@}"