From 9a4fd039c1206fb79b9b4f098fe4e34474e1907d Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 27 Sep 2020 22:46:10 -0300 Subject: Fix: hydractl sync-media-export logic --- share/hydractl/sync-media-export | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'share/hydractl/sync-media-export') diff --git a/share/hydractl/sync-media-export b/share/hydractl/sync-media-export index 8cf44cb..23e9a8d 100755 --- a/share/hydractl/sync-media-export +++ b/share/hydractl/sync-media-export @@ -27,11 +27,8 @@ for file in `ls $MEDIA`; do 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/ && \ -- cgit v1.2.3