1 1.1 lukem #! /bin/sh 2 1.1 lukem # $OpenLDAP: pkg/ldap/build/mkrelease,v 1.23.2.4 2008/02/11 23:26:37 kurt Exp $ 3 1.1 lukem ## This work is part of OpenLDAP Software <http://www.openldap.org/>. 4 1.1 lukem ## 5 1.1 lukem ## Copyright 1998-2008 The OpenLDAP Foundation. 6 1.1 lukem ## All rights reserved. 7 1.1 lukem ## 8 1.1 lukem ## Redistribution and use in source and binary forms, with or without 9 1.1 lukem ## modification, are permitted only as authorized by the OpenLDAP 10 1.1 lukem ## Public License. 11 1.1 lukem ## 12 1.1 lukem ## A copy of this license is available in the file LICENSE in the 13 1.1 lukem ## top-level directory of the distribution or, alternatively, at 14 1.1 lukem ## <http://www.OpenLDAP.org/license.html>. 15 1.1 lukem # 16 1.1 lukem # Make a release 17 1.1 lukem # mkrelease RELNAME CVSTAG CVSMODULES 18 1.1 lukem # where CVSTAG is the tag to export from the current CVSROOT 19 1.1 lukem # 20 1.1 lukem 21 1.1 lukem # 22 1.1 lukem # This script MUST NOT add files to the export nor modify 23 1.1 lukem # any file in the export. 24 1.1 lukem # 25 1.1 lukem 26 1.1 lukem set -e # exit immediately if any errors occur 27 1.1 lukem 28 1.1 lukem if test $# != 3 ; then 29 1.1 lukem echo 'usage: mkrelease RELNAME CVSTAG CVSMODULES ...' 30 1.1 lukem exit 1 31 1.1 lukem fi 32 1.1 lukem 33 1.1 lukem RELNAME=openldap-$1 34 1.1 lukem shift 35 1.1 lukem CVSTAG=$1 36 1.1 lukem shift 37 1.1 lukem 38 1.1 lukem if test -e $RELNAME ; then 39 1.1 lukem echo "error: $RELNAME exists" 40 1.1 lukem exit 1 41 1.1 lukem fi 42 1.1 lukem 43 1.1 lukem echo Release: $RELNAME 44 1.1 lukem echo CVS Tag: $CVSTAG 45 1.1 lukem echo Modules: $* 46 1.1 lukem 47 1.1 lukem cvs -q export -kkv -r $CVSTAG -d $RELNAME $* 48 1.1 lukem 49 1.1 lukem if test ! -d $RELNAME ; then 50 1.1 lukem echo "error: $RELNAME doesn't exists" 51 1.1 lukem exit 1 52 1.1 lukem fi 53 1.1 lukem 54 1.1 lukem if test -e $RELNAME/doc/guide/admin/guide.sdf ; then 55 1.1 lukem echo "build guide..." 56 1.1 lukem ( cd $RELNAME/doc/guide/admin ; make guide.html ) 57 1.1 lukem else 58 1.1 lukem echo "No guide" 59 1.1 lukem fi 60 1.1 lukem 61 1.1 lukem if test -e $RELNAME/libraries/liblunicode/ucdata/uctable.h ; then 62 1.1 lukem echo "touching uctable.h..." 63 1.1 lukem touch $RELNAME/libraries/liblunicode/ucdata/uctable.h 64 1.1 lukem fi 65 1.1 lukem 66 1.1 lukem if test ! -e $RELNAME/build/version.sh ; then 67 1.1 lukem echo "No build version" 68 1.1 lukem OL_STRING="something" 69 1.1 lukem else 70 1.1 lukem eval `$RELNAME/build/version.sh` 71 1.1 lukem fi 72 1.1 lukem 73 1.1 lukem echo "Rolling up $OL_STRING ..." 74 1.1 lukem 75 1.1 lukem 76 1.1 lukem tar cf $RELNAME.tar $RELNAME 77 1.1 lukem gzip -9 -c $RELNAME.tar > $RELNAME.tgz 78 1.1 lukem md5 $RELNAME.tgz > $RELNAME.md5 79 1.1 lukem sha1 $RELNAME.tgz > $RELNAME.sha1 80 1.1 lukem rm -f $RELNAME.tar 81 1.1 lukem 82 1.1 lukem ls -l $RELNAME.* 83 1.1 lukem 84 1.1 lukem echo "Made $OL_STRING as $RELNAME.tgz" 85