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

Contents of /eggdrop1.7/misc/releaseprep

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


Revision 1.4 - (show annotations) (download)
Mon Nov 20 13:53:32 2006 UTC (12 years, 7 months ago) by tothwolf
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +2 -2 lines
* Updated copyright dates for 2006 (better late than never).

1 #! /bin/sh
2 #
3 # releaseprep - prepares the tree for release
4 #
5 # Copyright (C) 2004 - 2006 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.3 2005/01/21 01:43:38 wcc 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 change_default_make() {
40 cat configure | sed 's/DEFAULT_MAKE="debug"/DEFAULT_MAKE="eggdrop"/g' > configure_
41 cat aclocal.m4 | sed 's/DEFAULT_MAKE="debug"/DEFAULT_MAKE="eggdrop"/g' > aclocal.m4_
42 mv configure_ configure
43 mv aclocal.m4_ aclocal.m4
44 chmod +x configure
45 }
46
47 fix_patch_h() {
48 if test $do_rc -eq 1; then
49 misc/addpatch RC${rc_number} >/dev/null
50 cat src/patch.h | sed 's/^patch.*CVS.*CVS version \*\//patch("PRE-RELEASE"); \/* RC version *\//g' > src/patch.h_
51 else
52 cat src/patch.h | sed 's/^patch.*/\/* PATCH GOES HERE *\//g' > src/patch.h_
53 fi
54 mv src/patch.h_ src/patch.h
55 }
56
57 create_default_makefile() {
58 cat << '_EOF' > Makefile
59 all:
60 @echo ""
61 @echo "Before you can compile your bot you have to configure it."
62 @echo "Please start the configure script now:"
63 @echo ""
64 @echo " % ./configure"
65 @echo ""
66
67 _EOF
68 }
69
70 if test "x${1}" = "x-h" || test "x${1}" = "x--help"; then
71 show_usage
72 fi
73
74 do_rc=0
75 if test "x${1}" = "x-r" || test "x${1}" = "x--rc"; then
76 do_rc=1
77 if test "x${2}" = "x"; then
78 show_usage
79 fi
80 rc_number=$2
81 fi
82
83 if test ! -f src/main.c; then
84 echo "You are not in the Eggdrop root directory."
85 exit 1
86 fi
87
88 # Change default make from "debug" to "eggdrop"...
89 echo -n "Changing default make..."
90 change_default_make
91 echo " done."
92
93 # Fix patch.h...
94 echo -n "Fixing patch.h..."
95 fix_patch_h
96 echo " done."
97
98 # Remove CVS dirs.
99 echo -n "Removing CVS and autom4te.cache directories..."
100 find ./ -type d -name "autom4te.cache" -print | xargs rm -rf
101 find ./ -type d -name "CVS" -print | xargs rm -rf
102 echo " done."
103
104 # Remove .cvsignores.
105 echo -n "Removing .cvsignore files..."
106 find ./ -name ".cvsignore" -print | xargs rm -f
107 echo " done."
108
109 # Remove doc/web_docs/ and doc/html/chat/
110 if test -d ./doc/web_docs; then
111 echo -n "Removing doc/web_docs/..."
112 rm -rf doc/web_docs
113 echo " done."
114 fi
115 if test -d ./doc/html/chat; then
116 echo -n "Removing doc/html/chat/..."
117 rm -rf doc/html/chat
118 echo " done."
119 fi
120
121 # make distclean
122 echo ""
123 echo "Running make distclean."
124 sh configure >/dev/null && make distclean >/dev/null
125 echo ""
126
127 # Create Makefile.
128 echo -n "Creating Makefile..."
129 create_default_makefile
130 echo " done."
131
132 echo Current patch: `misc/addpatch -s`
133 echo "Complete."
134 echo ""

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23