if [ ! -d "$DESTINATION" ]; then
if ssh $DESTINATION if [ -d \"/var/cache/media/$file\" ] \; then echo exists\; fi | grep -q exists; then
echo "Remote $file already exists, skipping..."
- continue;
- fi
-
- # If remote destination, add a git post-receive hook
- if [ -d "$file/.git" ]; then
+ elif [ -d "$file/.git" ]; then
+ # If remote destination, add a git post-receive hook
git clone $file $file.git && \
cp -a $APP_BASE/lib/hydra/hooks/post-receive $file.git/.git/hooks/post-receive && \
rsync -avz $file.git/ $DESTINATION:/var/cache/media/$file/ && \