comparison package @ 59:7d5c637aaafb

General cleanup and code fixes. Use autoscan to cleanup our autoconf system. Use autoconf to detect when we need to use our XGetopt files and other header files. Decode BCC field. Fix missing LE32_CPU byte swapping for FILETIME types.
author Carl Byington <carl@five-ten-sg.com>
date Thu, 14 Feb 2008 14:55:32 -0800
parents c03974357771
children 97b7706bdda2
comparison
equal deleted inserted replaced
58:a8b772313ff4 59:7d5c637aaafb
1 #!/bin/bash 1 #!/bin/bash
2 2
3 T=`grep AM_INIT_AUTOMAKE configure.in | cut -d'(' -f2` 3 find . -name '*~' | while read a; do rm -f "$a"; done
4
5 # setup environment
6 T=`grep AC_INIT configure.in | cut -d'(' -f2`
4 NAME=`echo $T | cut -d, -f1` 7 NAME=`echo $T | cut -d, -f1`
5 VER=`echo $T | cut -d, -f2 | cut -d')' -f1` 8 VER=`echo $T | cut -d, -f2`
6 BALL=$NAME-$VER.tar.gz 9 BALL=$NAME-$VER.tar.gz
7 web=/home/httpd/html/510sg/$NAME 10 web=/home/httpd/html/510sg/$NAME
8 distlog=/tmp/distcheck 11 distlog=/tmp/distcheck
12 repo=/usr/hg-repository/$NAME
13 exit
9 14
15 # check for uncommitted changes
16 a=$(hg status)
17 if [ -n "$a" ]; then
18 hg status
19 echo "fix those first with 'hg commit'"
20 exit 0
21 fi
22
23 # check for changesets pending push to global repository
24 hg outgoing $repo | grep 'no changes found' >/dev/null
25 if [ $? -ne 0 ]; then
26 hg outgoing $repo
27 echo "fix those first with 'hg push $repo'"
28 exit 0
29 fi
30
31 # get a new clean copy from source control
32 orig=$(pwd)
33 pack=$orig/../$NAME-package
34 [ -d "$pack" ] && rm -rf "$pack"
35 mkdir "$pack"
36 cd "$pack"
37 hg clone $repo
38 cd $NAME
39
40 # build the package
41 mkdir -p $web
10 chown --recursive root:root * 42 chown --recursive root:root *
11 make -f *cvs 43 make -f *cvs
12 ./configure >/dev/null 44 ./configure >/dev/null
13 (cd xml; make; make distclean) 45 (cd xml; make; make distclean)
14 cp -a html/*html $web 46 cp -a html/*html $web
22 cd junk 54 cd junk
23 tar xfz ../$BALL 55 tar xfz ../$BALL
24 cd $NAME-$VER 56 cd $NAME-$VER
25 ./configure >/dev/null 57 ./configure >/dev/null
26 make >/dev/null 58 make >/dev/null
27 make install >/dev/null
28 cd .. 59 cd ..
29 cd .. 60 cd ..
30 61
31 # build rpm on target 62 # build rpm on target
32 target5=pmg2 63 target5=pmg2
54 fi 85 fi
55 else 86 else
56 tail -10 $distlog 87 tail -10 $distlog
57 fi 88 fi
58 chown --recursive carl:carl * 89 chown --recursive carl:carl *
59 #args="--recursive -z -e ssh --times --perms --links --relative --owner --group --numeric-ids --delete" 90
60 #echo rsync $args $web ns1:/ 91 # throw away the packaging directory
61 #rsync $args $web ns1:/ 92 cd "$pack/.."
62 # 93 rm -rf $NAME-package
63 #if [ -f /usr/local/bin/pst2ldif ]; then 94 cd "$orig"
64 # pushd /home/ldap
65 # pst=outlook.pst
66 # #rm -f pst2ldif.log my.log
67 # /usr/local/bin/pst2ldif -b 'o=ams-cc.com, c=US' -c 'newPerson' $pst >ams.ldif2
68 # #./readpstlog pst2ldif.log | less >my.log
69 # #hexdump -C $pst >pst.dump
70 #
71 # grep '^dn:' ams.ldif2 | sort >aaa
72 # grep '^dn:' ams.ldif | sort >bbb
73 # echo 'differences from nightly ldap'
74 # diff aaa bbb
75 # echo 'end differences'
76 # rm -f aaa bbb
77 # popd
78 #fi