Mercurial > dnsbl
annotate package @ 201:752d4315675c stable-6-0-16
add reference to mercurial repository in the documentation
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 02 Feb 2008 12:31:53 -0800 |
parents | d1ef12ab18b6 |
children |
rev | line source |
---|---|
107 | 1 #!/bin/bash |
2 | |
192
8f4a9a37d4d9
delay autowhitelisting to avoid out of office reply bots
carl
parents:
152
diff
changeset
|
3 find . -name '*~' | while read a; do rm -f "$a"; done |
8f4a9a37d4d9
delay autowhitelisting to avoid out of office reply bots
carl
parents:
152
diff
changeset
|
4 |
199
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
5 # check for uncommitted changes |
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
6 a=$(hg status) |
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
7 if [ -n "$a" ]; then |
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
8 hg status |
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
9 echo "fix those first with 'hg commit'" |
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
10 exit 0 |
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
11 fi |
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
12 |
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
13 # check for changesets pending push to global repository |
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
14 hg outgoing /usr/hg*/dnsbl | grep 'no changes found' >/dev/null |
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
15 if [ $? -ne 0 ]; then |
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
16 hg outgoing /usr/hg*/dnsbl |
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
17 echo "fix those first with 'hg push /usr/hg*/dnsbl'" |
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
18 exit 0 |
d1ef12ab18b6
check for uncommitted changes, and for pending push changesets
Carl Byington <carl@five-ten-sg.com>
parents:
198
diff
changeset
|
19 fi |
198
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
20 |
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
21 # get a new clean copy from source control |
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
22 orig=$(pwd) |
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
23 pack=$orig/../dnsbl-package |
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
24 [ -d "$pack" ] && rm -rf "$pack" |
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
25 mkdir "$pack" |
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
26 cd "$pack" |
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
27 hg clone /usr/hg-repository/dnsbl |
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
28 cd dnsbl |
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
29 |
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
30 # build the dnsbl package |
148
9330b8d6a56b
add documentation fixes, allow env_from target of inherit
carl
parents:
117
diff
changeset
|
31 T=`grep AC_INIT configure.in | cut -d'(' -f2` |
107 | 32 NAME=`echo $T | cut -d, -f1` |
148
9330b8d6a56b
add documentation fixes, allow env_from target of inherit
carl
parents:
117
diff
changeset
|
33 VER=`echo $T | cut -d, -f2` |
107 | 34 BALL=$NAME-$VER.tar.gz |
35 web=/home/httpd/html/510sg/$NAME | |
36 distlog=/tmp/distcheck | |
37 | |
117 | 38 mkdir -p $web |
107 | 39 chown --recursive root:root * |
40 make -f *cvs | |
41 ./configure >/dev/null | |
42 (cd xml; make; make distclean) | |
113 | 43 cp -a html/*html $web |
107 | 44 make distcheck >$distlog 2>&1 |
45 if [ $? -eq 0 ]; then | |
46 if [ -f $BALL ]; then | |
47 # expand locally to see the tarball | |
48 rm -rf junk | |
113 | 49 mkdir junk |
50 cd junk | |
51 tar xfz ../$BALL | |
52 cd $NAME-$VER | |
53 ./configure >/dev/null | |
54 make >/dev/null | |
112 | 55 ## make install >/dev/null |
56 ## if [ -f /etc/rc.d/init.d/$NAME ]; then | |
57 ## /etc/rc.d/init.d/$NAME stop | |
58 ## fi | |
59 ## make chkconfig | |
60 ## if [ -f /etc/rc.d/init.d/$NAME ]; then | |
61 ## chkconfig $NAME on | |
62 ## /etc/rc.d/init.d/$NAME start | |
63 ## fi | |
113 | 64 cd .. |
65 cd .. | |
107 | 66 |
67 # build rpm on target | |
152 | 68 target5=pmg2 |
69 scp $BALL $target5:/tmp | |
70 ssh $target5 "cd /tmp; rpmbuild -ta $BALL" | |
71 | |
72 # build rpm on target | |
73 target4=host62 | |
74 scp $BALL $target4:/tmp | |
75 ssh $target4 "cd /tmp; rpmbuild -ta $BALL" | |
107 | 76 |
77 # add packages to the web site | |
78 wp=$web/packages | |
79 wp4=$wp/centos4 | |
152 | 80 wp5=$wp/centos5 |
81 mkdir -p $wp4 $wp5 | |
107 | 82 rp=/usr/src/redhat |
112 | 83 mv -f $BALL $wp |
152 | 84 scp $target4:$rp/SRPMS/$NAME-$VER*rpm $wp |
85 scp $target4:$rp/RPMS/i386/$NAME-$VER*rpm $wp4 | |
86 scp $target5:$rp/RPMS/i386/$NAME-$VER*rpm $wp5 | |
107 | 87 (cd $web; chown --recursive web:web *; ls -alR) |
88 rpm -ql -p $wp4/$NAME-$VER*6.rpm | |
152 | 89 rpm -ql -p $wp5/$NAME-$VER*6.rpm |
107 | 90 fi |
91 else | |
92 tail -10 $distlog | |
93 fi | |
94 chown --recursive carl:carl * | |
198
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
95 |
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
96 # throw away the packaging directory |
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
97 cd "$pack/.." |
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
98 rm -rf dnsbl-package |
fbcf2733fe79
always rebuild from clean source control tip, rather than from working directory
Carl Byington <carl@five-ten-sg.com>
parents:
192
diff
changeset
|
99 cd "$orig" |