The main Bubble source repository. Contains the Bubble API server, the web UI, documentation and utilities. https://getbubblenow.com
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

29 lignes
833 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. if [[ -z "${BUBBLE_SSH_PORT}" ]] ; then
  13. BUBBLE_SSH_PORT="1202"
  14. fi
  15. function die() {
  16. echo 1>&2 "${1}"
  17. exit 1
  18. }
  19. if [[ $(echo "${@}" | grep -c -- "-e ") -gt 0 || $(echo "${@}" | grep -c -- "--rsh") -gt 0 ]] ; then
  20. die "$0 does not work correctly when -e or --rsh is used, since it sets its own: ${@}"
  21. fi
  22. RSYNC_SSH_OPTS="$(which ssh) -p ${BUBBLE_SSH_PORT}"
  23. rsync -e "${RSYNC_SSH_OPTS}" "${@}"