Add addr module and autogenerated files to release tarball.
[darkstat] / release.sh
1 #!/bin/sh
2 #
3 # release.sh: script to roll a release tarball of darkstat.
4 # copyright (c) 2006-2009 Emil Mikulic.
5 #
6 # This is for developer use only and lives in the repo but
7 # shouldn't end up in a tarball.
8 #
9 # Remember to run "./test_headers.sh *.h"
10 # Remember to run "make depend" to update deps in Makefile.in
11 #
12
13 if [ $# -ne 1 ]; then
14 echo "usage: $0 version" >&2
15 exit 1
16 fi
17
18 NAME=darkstat
19 VERSION="$1"
20
21 files="\
22 AUTHORS \
23 ChangeLog \
24 COPYING.GPL \
25 INSTALL \
26 LICENSE \
27 Makefile.in \
28 NEWS \
29 README \
30 acct.c \
31 acct.h \
32 addr.c \
33 addr.h \
34 cap.c \
35 cap.h \
36 contrib \
37 conv.c \
38 conv.h \
39 darkstat.8.in \
40 darkstat.c \
41 darkstat.h \
42 daylog.c \
43 daylog.h \
44 db.c \
45 db.h \
46 decode.c \
47 decode.h \
48 dns.c \
49 dns.h \
50 err.c \
51 err.h \
52 export-format.txt \
53 graph_db.c \
54 graph_db.h \
55 graphjs.h \
56 hosts_db.c \
57 hosts_db.h \
58 hosts_sort.c \
59 html.c \
60 html.h \
61 http.c \
62 http.h \
63 install-sh \
64 localip.c \
65 localip.h \
66 ncache.c \
67 ncache.h \
68 now.h \
69 pidfile.c \
70 pidfile.h \
71 queue.h \
72 static \
73 str.c \
74 str.h \
75 stylecss.h \
76 tree.h \
77 "
78 # end packing list
79
80 PKG=$NAME-$VERSION
81 echo ==\> releasing $PKG
82
83 run() {
84 echo ==\> $@
85 eval $@ || { echo ERROR!; exit 1; }
86 }
87
88 run mkdir $PKG
89 run cp -r $files $PKG/.
90
91 # set the version number
92 (echo "AC_INIT(darkstat, $VERSION)"
93 grep -v "^AC_INIT" configure.ac) > $PKG/configure.ac
94
95 echo ==\> set version: `grep '^AC_INIT' $PKG/configure.ac`
96 (
97 cd $PKG
98 run autoconf
99 run autoheader
100 run rm -r autom4te.cache
101 )
102
103 # package it up
104 run tar -cf $PKG.tar $PKG
105 run bzip2 -9vv $PKG.tar
106 echo ==\> output:
107 ls -l $PKG.tar.bz2
108 echo ==\> FINISHED!