annotate DOCS/tech/mirrors/update_mplayer_rsync @ 26625:5b89b42f6d50

Only compile and use libmpeg2 AltiVec code when AltiVec is available. The AltiVec code needs -maltivec to compile, but then AltiVec instructions appear in other places of the code causing MPlayer to sigill. Somehow upstream libmpeg2 manages not to sigill under what appear to be the same circumstances. Enlightenment welcome.
author diego
date Sat, 03 May 2008 15:23:22 +0000
parents daccad6cb91d
children 32725ca88fed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
18674
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
1 #!/usr/bin/env bash
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
2 # MPlayer mirroring script
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
3 # $Id$
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
4
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
5 PATH=<set_path_if_necessary>
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
6 LOCK=<path_to_lockfile>
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
7 MIRROR_ROOT=<path_to_mirror_root>
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
8 MAILADR=<report_mail_to_adr>
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
9
18700
2298d0af4649 cosmetics
diego
parents: 18674
diff changeset
10 #TMPDIR = /tmp
18674
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
11 #export TMPDIR
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
12
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
13 TMPFILE=`mktemp -t mplayer.XXXXXXXXXXX`
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
14
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
15 # Check to see if another sync is in progress
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
16 if lockfile -! -l 43200 -r 0 "$LOCK"; then
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
17 echo Unable to start mirroring MPlayer, lock file exists.
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
18 exit 1
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
19 fi
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
20 trap "rm -f $LOCK > /dev/null 2>&1" exit
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
21
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
22 cd $MIRROR_ROOT
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
23
18700
2298d0af4649 cosmetics
diego
parents: 18674
diff changeset
24 echo "************ rsyncing homepage ************" >> $TMPFILE
18806
daccad6cb91d natsuki.mplayerhq.hu -> rsync.mplayerhq.hu
attila
parents: 18701
diff changeset
25 rsync -pxlrHtWv --delete --delete-after rsync.mplayerhq.hu::homepage/ \
18700
2298d0af4649 cosmetics
diego
parents: 18674
diff changeset
26 homepage >> $TMPFILE 2>&1
18674
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
27
18700
2298d0af4649 cosmetics
diego
parents: 18674
diff changeset
28 echo "************ rsyncing MPlayer ************" >> $TMPFILE
18674
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
29 rsync -pxlrHtWv --delete --delete-after --exclude '/benchmark' \
18806
daccad6cb91d natsuki.mplayerhq.hu -> rsync.mplayerhq.hu
attila
parents: 18701
diff changeset
30 --exclude '/old_stuff' --exclude '/tests' rsync.mplayerhq.hu::ftp/ \
18700
2298d0af4649 cosmetics
diego
parents: 18674
diff changeset
31 MPlayer >> $TMPFILE 2>&1
18674
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
32
18700
2298d0af4649 cosmetics
diego
parents: 18674
diff changeset
33 x=`wc -l $TMPFILE | awk '{print $1}'`
18674
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
34 if [ "$x" -ne "10" ]
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
35 then
18700
2298d0af4649 cosmetics
diego
parents: 18674
diff changeset
36 mailx -s "MPlayer mirror" $MAILADR < $TMPFILE
18674
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
37 fi
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
38 rm -f $TMPFILE
abaac3427f7c Preliminary version of mirror howto
attila
parents:
diff changeset
39