diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2020-09-27 22:46:10 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2020-09-27 22:46:10 -0300 |
commit | 9a4fd039c1206fb79b9b4f098fe4e34474e1907d (patch) | |
tree | d67630d3ee1d19add471656c09a82e0cbcf08baf /share/hydractl/sync-media-export | |
parent | 214b919659d3a1cd606308ba52ace5c6380b6df8 (diff) | |
download | hydra-9a4fd039c1206fb79b9b4f098fe4e34474e1907d.tar.gz hydra-9a4fd039c1206fb79b9b4f098fe4e34474e1907d.tar.bz2 |
Fix: hydractl sync-media-export logic
Diffstat (limited to 'share/hydractl/sync-media-export')
-rwxr-xr-x | share/hydractl/sync-media-export | 7 |
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/ && \ |