/[cvs]/eggdrop1.8/misc/releaseprep
ViewVC logotype

Contents of /eggdrop1.8/misc/releaseprep

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1.1.1 - (show annotations) (download) (vendor branch)
Mon Jul 26 21:11:06 2010 UTC (8 years, 7 months ago) by simple
Branch: eggheads, MAIN
CVS Tags: v1, HEAD
Branch point for: gettext
Changes since 1.1: +0 -0 lines
Imported Eggdrop 1.6.20

1 #! /bin/sh
2 #
3 # releaseprep - prepares the tree for release
4 #
5 # Copyright (C) 2004 - 2010 Eggheads Development Team
6 #
7 # This file is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 #
21 # As a special exception to the GNU General Public License, if you
22 # distribute this file as part of a program that contains a
23 # configuration script generated by Autoconf, you may include it under
24 # the same distribution terms that you use for the rest of that program.
25 #
26 # $Id: releaseprep,v 1.18 2010/01/03 13:27:23 pseudo Exp $
27
28 show_usage() {
29 echo "Usage: `basename $0` [-h|-r <#>]"
30 echo ""
31 echo " patchname - Name of last patch added."
32 echo " unixtime - Some unixtime number or 'now'. Default is 'now'."
33 echo ""
34 echo " -h, --help - Print this help and exit."
35 echo " -r, --rc - Prepare to release Release Candidate '#'."
36 exit 1
37 }
38
39 regenerate_changelog() {
40 cvs2cl=`which cvs2cl`
41 if test "x${cvs2cl}" = "x"; then
42 echo "Error: Could not locate \`cvs2cl' program."
43 exit 1
44 fi
45 if ! $cvs2cl; then
46 echo "Error while attempting to run \`cvs2cl' program."
47 exit 1
48 fi
49 if test -f ChangeLog; then
50 if test -s ChangeLog; then
51 if test -f ChangeLog.bak; then
52 rm -f ChangeLog.bak
53 fi
54 else
55 echo "Error: Generated ChangeLog file is empty."
56 exit 1
57 fi
58 else
59 echo "Error: No ChangeLog file found."
60 exit 1
61 fi
62 }
63
64 change_default_make() {
65 cat configure | sed 's/DEFAULT_MAKE="debug"/DEFAULT_MAKE="eggdrop"/g' > configure_
66 cat aclocal.m4 | sed 's/DEFAULT_MAKE="debug"/DEFAULT_MAKE="eggdrop"/g' > aclocal.m4_
67 mv configure_ configure
68 mv aclocal.m4_ aclocal.m4
69 chmod +x configure
70 }
71
72 fix_patch_h() {
73 if test $do_rc -eq 1; then
74 misc/addpatch RC${rc_number} >/dev/null
75 cat src/patch.h | sed 's/^patch.*CVS.*CVS version \*\//patch("PRE-RELEASE"); \/* RC version *\//g' > src/patch.h_
76 else
77 cat src/patch.h | sed 's/^patch.*/\/* PATCH GOES HERE *\//g' > src/patch.h_
78 fi
79 mv src/patch.h_ src/patch.h
80 }
81
82 create_default_makefile() {
83 cat << '_EOF' > Makefile
84 all:
85 @echo ""
86 @echo "Before you can compile your bot you have to configure it."
87 @echo "Please start the configure script now:"
88 @echo ""
89 @echo " % ./configure"
90 @echo ""
91
92 _EOF
93 }
94
95 if test "x${1}" = "x-h" || test "x${1}" = "x--help"; then
96 show_usage
97 fi
98
99 do_rc=0
100 if test "x${1}" = "x-r" || test "x${1}" = "x--rc"; then
101 do_rc=1
102 if test "x${2}" = "x"; then
103 show_usage
104 fi
105 rc_number=$2
106 fi
107
108 if test ! -f src/main.c; then
109 echo "You are not in the Eggdrop root directory."
110 exit 1
111 fi
112
113
114 # Regenerate ChangeLog file before doing anything else...
115 echo "Regenerating ChangeLog file..."
116 regenerate_changelog
117 echo ""
118
119 # Change default make from "debug" to "eggdrop"...
120 echo -n "Changing default make..."
121 change_default_make
122 echo " done."
123
124 # Fix patch.h...
125 echo -n "Fixing patch.h..."
126 fix_patch_h
127 echo " done."
128
129 # Remove CVS dirs.
130 echo -n "Removing CVS and autom4te.cache directories..."
131 find ./ -type d -name "autom4te.cache" -print | xargs rm -rf
132 find ./ -type d -name "CVS" -print | xargs rm -rf
133 echo " done."
134
135 # Remove .cvsignores.
136 echo -n "Removing .cvsignore files..."
137 find ./ -name ".cvsignore" -print | xargs rm -f
138 echo " done."
139
140 # Remove doc/web_docs/ and doc/html/chat/
141 if test -d ./doc/web_docs; then
142 echo -n "Removing doc/web_docs/..."
143 rm -rf doc/web_docs
144 echo " done."
145 fi
146 if test -d ./doc/html/chat; then
147 echo -n "Removing doc/html/chat/..."
148 rm -rf doc/html/chat
149 echo " done."
150 fi
151
152 # make distclean
153 echo ""
154 echo "Running make distclean."
155 sh configure >/dev/null && make distclean >/dev/null
156 echo ""
157
158 # Create Makefile.
159 echo -n "Creating Makefile..."
160 create_default_makefile
161 echo " done."
162
163 echo Current patch: `misc/addpatch -s`
164 echo "Complete."
165 echo ""

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23