Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / tools / build / sync-configure
blob1b8a5835b1b5c4af2decb7a4ea4d52c921fe95cd
1 #!/bin/sh -x
3 # 3/3/03 - Now Runs on bawb as cltbld
4 # 5/1/03 - Now Runs on branch as cltbld
5 # 2003/02/24 - Now runs on egg as cltbld
6 # 2005/08/24 - Modified to take a branch argument (chase)
7 # 2006-06-27 - Modified to use hostname -f (dbaron)
9 BRANCH="HEAD"
10 if [ "x$1" != "x" ]; then
11 BRANCH=$1
14 # Autoconf ***must*** be 2.13.
15 AC="/usr/bin/autoconf-2.13"
16 CVS="/usr/bin/cvs"
17 CVSROOT='cltbld@cvs.mozilla.org:/cvsroot'
18 CVS_RSH=ssh
19 PATH="/usr/bin:/bin:/usr/local/bin:/usr/sbin:/usr/bsd:/sbin:/usr/bin:/bin:/usr/etc:/usr/ucb"
20 TDIR="/tmp/c-s.$$"
21 HOST=`/bin/hostname -f`
23 export CVSROOT CVS_RSH PATH
25 rm -rf ${TDIR}
26 mkdir ${TDIR}
27 cd ${TDIR}
29 use_tmpdir()
31 if [ "$BRANCH" = "HEAD" ]; then
32 ${CVS} -q checkout mozilla/configure.in mozilla/configure mozilla/build/autoconf mozilla/aclocal.m4
33 else
34 ${CVS} -q checkout -r $BRANCH mozilla/configure.in mozilla/configure mozilla/build/autoconf mozilla/aclocal.m4
37 CO_STATUS=$?
38 if [ $CO_STATUS != 0 ]
39 then
40 echo "ERROR cvs checkout exited with a non-zero exit code: $CO_STATUS"
41 return $CO_STATUS
44 cd mozilla
45 ${AC} -l build/autoconf
46 AC_STATUS=$?
47 if [ $AC_STATUS != 0 ]
48 then
49 echo "ERROR autoconf exited with a non-zero exit code: $AC_STATUS"
50 return $AC_STATUS
53 ${CVS} diff configure >/dev/null 2>&1
54 DIFF_STATUS=$?
55 if [ $DIFF_STATUS == 1 ]
56 then
57 ${CVS} commit -m"Automated update from host $HOST" configure
58 CI_STATUS=$?
59 if [ $CI_STATUS != 0 ]
60 then
61 echo "ERROR cvs commit exited with exit code: $CI_STATUS"
62 return $CI_STATUS
64 elif [ $DIFF_STATUS == 0 ]
65 then
66 return 0
67 else
68 echo "ERROR cvs diff exited with exit code: $DIFF_STATUS"
69 return $DIFF_STATUS
73 use_tmpdir
74 result=$?
75 rm -rf ${TDIR}
76 exit $result