Ein für Shopware 6 vorbereitet Systemmanagment.
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.

28 lines
903 B

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. #!/bin/bash
  2. ### DO NOT EDIT THIS FILE
  3. source "$(dirname "${BASH_SOURCE[0]}")/../includes/includes.sh"
  4. app_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." &> /dev/null && pwd)
  5. source "$app_dir/etc/config.sh"
  6. env=$(getArgument "$1" "Usage: import_media.sh [live|stage] /path/to/files" "live stage")
  7. filepath=$(getArgument "$2" "Usage: import_media.sh [live|stage] /path/to/files" true)
  8. echo
  9. echoMainTitle "Fetching $filepath files from $env"
  10. addSSHKey "$env"
  11. ssh_user="$(eval "echo \$${env}_ssh_user")"
  12. ssh_domain="$(eval "echo \$${env}_ssh_domain")"
  13. slug="$(eval "echo \"\$local_${env}_slug\"")"
  14. source="$(eval "echo \"\$${env}_httpdocs_path\$${env}_httpdocs_slug\$filepath/.\"")"
  15. target="$app_dir/git/${project_name}${slug}${filepath}/."
  16. echo
  17. echo "Fetch Files ..."
  18. rsync -auvzqLK --delete "$ssh_user"@"$ssh_domain":"$source" "$target"
  19. postScript "$app_dir/bin/postscripts/import_media.sh"
  20. echo