Mercurial > mplayer.hg
comparison DOCS/tech/mirrors/update_mplayer_rsync @ 30793:c7d1b504d026
Use $() syntax instead of backticks, it is easier to nest.
author | diego |
---|---|
date | Thu, 04 Mar 2010 15:55:35 +0000 |
parents | 32725ca88fed |
children | e4e2bcd96a56 |
comparison
equal
deleted
inserted
replaced
30792:f89de69d4527 | 30793:c7d1b504d026 |
---|---|
8 MAILADR=<report_mail_to_adr> | 8 MAILADR=<report_mail_to_adr> |
9 | 9 |
10 #TMPDIR = /tmp | 10 #TMPDIR = /tmp |
11 #export TMPDIR | 11 #export TMPDIR |
12 | 12 |
13 TMPFILE=`mktemp -t mplayer.XXXXXXXXXXX` | 13 TMPFILE=$(mktemp -t mplayer.XXXXXXXXXXX) |
14 | 14 |
15 # Check to see if another sync is in progress | 15 # Check to see if another sync is in progress |
16 if lockfile -! -l 43200 -r 0 "$LOCK"; then | 16 if lockfile -! -l 43200 -r 0 "$LOCK"; then |
17 echo Unable to start mirroring MPlayer, lock file exists. | 17 echo Unable to start mirroring MPlayer, lock file exists. |
18 exit 1 | 18 exit 1 |
28 echo "************ rsyncing MPlayer ************" >> $TMPFILE | 28 echo "************ rsyncing MPlayer ************" >> $TMPFILE |
29 rsync -pxlrHtWv --delete --delete-after --exclude '/benchmark' \ | 29 rsync -pxlrHtWv --delete --delete-after --exclude '/benchmark' \ |
30 --exclude '/old_stuff' --exclude '/tests' rsync.mplayerhq.hu::ftp/ \ | 30 --exclude '/old_stuff' --exclude '/tests' rsync.mplayerhq.hu::ftp/ \ |
31 MPlayer >> $TMPFILE 2>&1 | 31 MPlayer >> $TMPFILE 2>&1 |
32 | 32 |
33 x=`wc -l $TMPFILE | awk '{print $1}'` | 33 x=$(wc -l $TMPFILE | awk '{print $1}') |
34 if [ "$x" -ne "10" ] | 34 if [ "$x" -ne "10" ] |
35 then | 35 then |
36 mailx -s "MPlayer mirror" $MAILADR < $TMPFILE | 36 mailx -s "MPlayer mirror" $MAILADR < $TMPFILE |
37 fi | 37 fi |
38 rm -f $TMPFILE | 38 rm -f $TMPFILE |