server/bin/pull.sh
Ryan McCue 3e7bc6e67b Initial export of the repository
Signed-off-by: Ryan McCue <me@ryanmccue.info>
2025-06-05 11:48:47 +02:00

24 lines
525 B
Bash
Executable file

#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR/..
# Force SSH to pull our password from the env var.
export SSH_ASKPASS='./bin/sshpass.sh'
export SSH_ASKPASS_REQUIRE='force'
# same as -rlptgoD
# -r = recursive
OPTS='-r'
# -L = follow links
OPTS+=' -L'
# preserve permissions, group, owner
OPTS+=' -pgo'
# -t = preserve modification times
OPTS+=' -t'
rsync \
-vz \
--exclude-from='.distignore' \
$OPTS \
$DEPLOY_USER@$DEPLOY_HOST:html/wp-content/ ./content/