-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuildtarball-36.sh
executable file
·52 lines (50 loc) · 1.27 KB
/
buildtarball-36.sh
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
#!/bin/sh
#
echo "This script will build a Bugzilla tarball based on a given CVS tag."
if [ ! "X$1" = "X" ] ; then
BZTAG=$1
echo "Using CVS tag from command line: $BZTAG"
else
echo -n "Enter the CVS tag to use: "
read BZTAG
if [ "X$BZTAG" = "X" ] ; then
echo "You entered an empty string - aborting."
exit
fi
fi
if [ ! "X$2" = "X" ] ; then
BZDIR=$2
echo "Using unpack directory name from command line: $BZDIR"
else
echo "Enter the name of the folder that should be created when the end user"
echo -n "unpacks the tarball: "
read BZDIR
if [ "X$BZDIR" = "X" ] ; then
echo "You entered an empty string - aborting."
exit
fi
fi
CMD="cvs -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot co -d $BZDIR -r $BZTAG Bugzilla"
echo $CMD
$CMD
if [ ! -e $BZDIR ] ; then
echo "$0: CVS checkout failed"
exit
fi
echo "cd $BZDIR"
cd $BZDIR
echo "cvs -q up -dP"
cvs -q up -dP
if [ ! -e docs/pdf ] ; then
echo "Building docs..."
perl -w docs/makedocs.pl --with-pdf
fi
echo "Installing CGI.pm..."
./install-module.pl CGI
echo "Removing non-essential dependencies from lib/..."
rm -rf lib/*linux* lib/man lib/Test lib/App lib/ExtUtils lib/TAP lib/CPAN* lib/YAML*
echo "cd .."
cd ..
echo "tar cfz ${BZDIR}.tar.gz $BZDIR"
tar cfz ${BZDIR}.tar.gz $BZDIR
echo "Done."