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.
 
 

26 lines
893 B

#!/bin/bash
source "$(dirname "${BASH_SOURCE[0]}")/../includes/includes.sh"
app_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." &> /dev/null && pwd)
source "$app_dir/etc/config.sh"
env=$(getArgument "$1" "Usage: import_media.sh [live|stage] /path/to/files" "live stage")
filepath=$(getArgument "$2" "Usage: import_media.sh [live|stage] /path/to/files" "/files /public/media")
addSSHKey "$env"
ssh_user="$(eval "echo \$${env}_ssh_user")"
ssh_domain="$(eval "echo \$${env}_ssh_domain")"
slug="$(eval "echo \"\$local_${env}_slug\"")"
source="$(eval "echo \"\$${env}_httpdocs_path\$${env}_httpdocs_slug\$filepath/.\"")"
target="$app_dir/git/${project_name}${slug}${filepath}/."
echo
echoMainTitle "Fetching $filepath files from $env"
echo
echo "Fetch Files ..."
rsync -auvzqLK --delete "$ssh_user"@"$ssh_domain":"$source" "$target"
postScript "$app_dir/bin/postscripts/import_media.sh"
echo