[m-rev.] for review: RPM build script

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Feb 8 21:50:28 AEDT 2004


On 08-Feb-2004, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> tools/build_rpm:
> 	New file.  This script builds and installs the RPM files.

Estimated hours taken: 0.5
Branches: main

tools/build_rpm:
	Allow building of RPMs files for branches other than the main branch.

Workspace: /home/pgrad/fjh/fs/aral/mercury
Index: tools/build_rpm
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/build_rpm,v
retrieving revision 1.1
diff -u -d -r1.1 build_rpm
--- tools/build_rpm	8 Feb 2004 10:31:33 -0000	1.1
+++ tools/build_rpm	8 Feb 2004 10:48:17 -0000
@@ -25,12 +25,24 @@
 
 #-----------------------------------------------------------------------------#
 
+usage() {
+	echo "Usage: $0 <branch-dir> <stability>" 1>&2
+	echo '<branch-dir> can be "rotd", "0.11.1-beta", "0.11", etc.'
+	echo '(It must match the subdirectory name on the web site.)'
+	echo '<stability> must be either "stable" or "unstable".' 1>&2
+	exit 1
+}
+
 # Parse the command-line arguments
-case "$#:$1" in
-	1:stable|1:unstable)
-		stability=$1 ;;
-	*) 
-		echo "Usage: $0 [stable|unstable]" 1>&2; exit 1 ;;
+
+case "$#" in
+	2)	branch_dir=$1; stability=$2 ;;
+	*)	usage ;;
+esac
+case "$stability" in
+	stable|unstable)
+		;;
+	*)	usage ;;
 esac
 
 #-----------------------------------------------------------------------------#
@@ -43,12 +55,12 @@
 # This is also used to find the .tar.gz source distribution and the
 # "latest-stable-version" and "latest-unstable-version" files.
 WEBDIR=/home/mercury/public/installed_w3/download/files
-BETA_WEBDIR=$WEBDIR/beta-releases/rotd
+BETA_WEBDIR=$WEBDIR/beta-releases/$branch_dir
 
 # Place to install files for the FTP site
 FTP_HOST=ftp.mercury.cs.mu.oz.au
 FTPDIR=$FTP_HOST:/home/ftp/pub/mercury
-BETA_FTPDIR=$FTPDIR/beta-releases/rotd
+BETA_FTPDIR=$FTPDIR/beta-releases/$branch_dir
 
 # Place to record log file (rpmbuild.out)
 LOGDIR=/home/mercury/public/test_mercury/logs

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list