diff options
-rwxr-xr-x | share/hydractl/sync-media-export | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/share/hydractl/sync-media-export b/share/hydractl/sync-media-export index 8647acc..5c5630d 100755 --- a/share/hydractl/sync-media-export +++ b/share/hydractl/sync-media-export @@ -1,6 +1,6 @@ #!/bin/bash # -# Copy git-annex repositories to remote destination. +# Copy repositories to remote destination. # # Parameters @@ -30,9 +30,14 @@ for file in `ls $MEDIA`; do continue; fi - git clone $file $file.git && \ - rsync -avz $file.git/ $DESTINATION:/var/cache/media/$file/ && \ - rm -rf $file.git + if [ -d "$file/.git" ]; then + git clone $file $file.git && \ + rsync -avz $file.git/ $DESTINATION:/var/cache/media/$file/ && \ + rm -rf $file.git + else + rsync -avz $file/ $DESTINATION:/var/cache/media/$file/ + fi + echo "" else mkdir -p $DESTINATION/var/cache/media |