aboutsummaryrefslogtreecommitdiff
path: root/files/sync-media-export
diff options
context:
space:
mode:
Diffstat (limited to 'files/sync-media-export')
-rwxr-xr-xfiles/sync-media-export37
1 files changed, 0 insertions, 37 deletions
diff --git a/files/sync-media-export b/files/sync-media-export
deleted file mode 100755
index 7b47639..0000000
--- a/files/sync-media-export
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/bin/bash
-#
-# Copy git-annex repositories to remote server.
-#
-
-# Parameters
-BASENAME="`basename $0`"
-DESTINATION="$1"
-DOMAIN="`facter DOMAIN`"
-MEDIA="/var/cache/media"
-
-# Syntax check
-if [ -z "$DESTINATION" ]; then
- echo "usage: $BASENAME <DESTINATION>"
- exit 1
-fi
-
-# Process each repository
-for file in `ls $MEDIA`; do
- if [ -d "$MEDIA/$file/.git/annex" ]; then
- (
- echo Processing "$MEDIA/$file..."
-
- cd $MEDIA
-
- 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
-
- git clone $file $file.git && \
- rsync -avz $file.git/ $DESTINATION:/var/cache/media/$file/ && \
- rm -rf $file.git
- echo ""
- )
- fi
-done