2 # MPlayer mirroring script
5 PATH
=<set_path_if_necessary
>
6 LOCK
=<path_to_lockfile
>
7 MIRROR_ROOT
=<path_to_mirror_root
>
8 MAILADR
=<report_mail_to_adr
>
13 TMPFILE
=$
(mktemp
-t mplayer.XXXXXXXXXXX
)
15 # Check to see if another sync is in progress
16 if lockfile
-! -l 43200 -r 0 "$LOCK"; then
17 echo Unable to start mirroring MPlayer
, lock
file exists.
20 trap "rm -f $LOCK > /dev/null 2>&1" exit
24 echo "************ rsyncing homepage ************" >> $TMPFILE
25 rsync
-pxlrHtWv --delete --delete-after rsync.mplayerhq.hu
::homepage
/ \
26 homepage
>> $TMPFILE 2>&1
28 echo "************ rsyncing MPlayer ************" >> $TMPFILE
29 rsync
-pxlrHtWv --delete --delete-after --exclude '/benchmark' \
30 --exclude '/old_stuff' --exclude '/tests' rsync.mplayerhq.hu
::ftp
/ \
31 MPlayer
>> $TMPFILE 2>&1
33 x
=$
(wc -l $TMPFILE |
awk '{print $1}')
34 if [ "$x" -ne "10" ]; then
35 mailx
-s "MPlayer mirror" $MAILADR < $TMPFILE