summaryrefslogtreecommitdiffstats
path: root/DOCS/tech/mirrors/update_mplayer_rsync
diff options
context:
space:
mode:
authorattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-10 20:48:06 +0000
committerattila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-06-10 20:48:06 +0000
commit3e3921d5f7c7a797da20ec9ab91ead56ab735c36 (patch)
treeb01c922ff4c7856b2aaa4a664ff6a00bd4005231 /DOCS/tech/mirrors/update_mplayer_rsync
parentc75969c4141293147a6bb39df18597537b4bd835 (diff)
downloadmpv-3e3921d5f7c7a797da20ec9ab91ead56ab735c36.tar.bz2
mpv-3e3921d5f7c7a797da20ec9ab91ead56ab735c36.tar.xz
Preliminary version of mirror howto
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18675 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'DOCS/tech/mirrors/update_mplayer_rsync')
-rw-r--r--DOCS/tech/mirrors/update_mplayer_rsync40
1 files changed, 40 insertions, 0 deletions
diff --git a/DOCS/tech/mirrors/update_mplayer_rsync b/DOCS/tech/mirrors/update_mplayer_rsync
new file mode 100644
index 0000000000..c952d4aa23
--- /dev/null
+++ b/DOCS/tech/mirrors/update_mplayer_rsync
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+# MPlayer mirroring script
+# $Id$
+
+PATH=<set_path_if_necessary>
+LOCK=<path_to_lockfile>
+MIRROR_ROOT=<path_to_mirror_root>
+MAILADR=<report_mail_to_adr>
+
+#TMPDIR = /tmp
+#export TMPDIR
+
+TMPFILE=`mktemp -t mplayer.XXXXXXXXXXX`
+
+# Check to see if another sync is in progress
+if lockfile -! -l 43200 -r 0 "$LOCK"; then
+ echo Unable to start mirroring MPlayer, lock file exists.
+ exit 1
+fi
+trap "rm -f $LOCK > /dev/null 2>&1" exit
+
+cd $MIRROR_ROOT
+
+echo "************ rsyncing homepage ************" >>$TMPFILE
+rsync -pxlrHtWv --delete --delete-after natsuki.mplayerhq.hu::homepage/ \
+ homepage >>$TMPFILE 2>&1
+
+echo "************ rsyncing MPlayer ************" >>$TMPFILE
+rsync -pxlrHtWv --delete --delete-after --exclude '/benchmark' \
+ --exclude '/old_stuff' --exclude '/tests' \
+ --exclude '/README.incoming' natsuki.mplayerhq.hu::ftp/ \
+ MPlayer >>$TMPFILE 2>&1
+
+x=`wc -l $TMPFILE|awk '{print $1}'`
+if [ "$x" -ne "10" ]
+then
+ mailx -s "mplayer mirror" $MAILADR <$TMPFILE
+fi
+rm -f $TMPFILE
+