Files
wp-docker-setup/pull-remote-webroot.sh
2023-11-24 02:01:03 +01:00

39 lines
841 B
Bash
Executable File

#! /bin/sh
#
read -p "Est-ce que le repertoire distant est bien monté localement (YyOo) ? " REPLY
if [ "$REPLY" != "${REPLY#[YyOo]}" ]; then
echo "we carry on"
else
echo "we stop"
exit 1
fi
read -p "Est-ce que le volume docker est bien monté localement (YyOo) ? " REPLY2
if [ "$REPLY2" != "${REPLY2#[YyOo]}" ]; then
echo "we carry on"
else
echo "we stop"
exit 1
fi
cat ./exclude-list
read -p "Est-ce que la commande rsync exclut bien un éventuel plugin ou thème en cours de développement en local (YyOo) ? " REPLY3
if [ "$REPLY3" != "${REPLY3#[YyOo]}" ]; then
echo "we carry on"
else
echo "we stop"
exit 1
fi
rsync \
--archive \
--delete \
--exclude '/wp-config.php' \
--exclude-from='exclude-list' \
--human-readable \
--progress \
--verbose \
"${PWD}/webroot-remote/" \
"${PWD}/webroot-volume"