-
Notifications
You must be signed in to change notification settings - Fork 6
/
distribclean
executable file
·66 lines (53 loc) · 1.49 KB
/
distribclean
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#!/bin/sh
#
# Ganymede distribution cleaner
#
# Last Revision Changed: $Rev$
# Last Changed By: $Author$
# Last Mod Date: $Date$
# SVN URL: $HeadURL$
#
# This script is intended to be used to clean out files
# used during the build process, in preparation of tar'ing
# up a Ganymede release.
#
# I.e., to build Ganymede, export Ganymede from the SVN
# archive to get a clean distrib copy, then do
#
# ./configure
# cd src
# ant total
# cd ..
# ./distribclean
#
# this will leave you with a copy of the Ganymede tree with
# the class and jar files necessary to allow someone to install
# and run Ganymede directly from a download without having
# to build the source themselves.
#
############################################################
echo "Ganymede distribution cleaner"
echo
prog=$0
GROOTDIR=`echo $prog|sed 's%/[^/][^/]*$%%'`
# if the program name is the same as the srcdir name, we have no path
# set.. must be .
test "x$GROOTDIR" = "x$prog" && GROOTDIR=.
if test ! -f $GROOTDIR/src/build.xml; then
echo "configure: error: can not find Ant file in $GROOTDIR/src/build.xml" 1>&2; exit 1;
fi
export GROOTDIR
# Okay, GROOTDIR is where we're at.
cd $GROOTDIR
# Remove the configured install scripts
echo "Removing custom install scripts"
rm -f installClient
rm -f installServer
rm -f installWeb
# Clean up the src tree.. remove the configured makefile,
# config.sh and rebuild files
echo "Cleaning source tree"
cd src
ant clean
echo "Redundant classes removed."
echo "Distribution is ready for packaging."