aboutsummaryrefslogtreecommitdiff
path: root/share/hydractl/sync-media-export
diff options
context:
space:
mode:
Diffstat (limited to 'share/hydractl/sync-media-export')
-rwxr-xr-xshare/hydractl/sync-media-export7
1 files changed, 2 insertions, 5 deletions
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/ && \