3 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
5 ## Copyright 1998-2017 The OpenLDAP Foundation.
6 ## All rights reserved.
8 ## Redistribution and use in source and binary forms, with or without
9 ## modification, are permitted only as authorized by the OpenLDAP
12 ## A copy of this license is available in the file LICENSE in the
13 ## top-level directory of the distribution or, alternatively, at
14 ## <http://www.OpenLDAP.org/license.html>.
20 # This script MUST NOT add files to the export nor modify
21 # any file in the export, exceptions:
25 set -e # exit immediately if any errors occur
27 if test $# != 3 ; then
28 echo 'usage: mkrelease REPO RELNAME TAG'
49 if test -e $RELNAME ; then
50 echo "error: $RELNAME exists"
54 echo Release: $RELNAME
57 git archive --format=tar --prefix="${RELNAME}/" --remote="${REPO}" "$TAG" | tar xvf -
59 if test ! -d $RELNAME ; then
60 echo "error: $RELNAME doesn't exists"
64 if test -e $RELNAME/doc/guide/admin/guide.sdf ; then
66 ( cd $RELNAME/doc/guide/admin ; make guide.html )
71 if test -e $RELNAME/libraries/liblunicode/ucdata/uctable.h ; then
72 echo "touching uctable.h..."
73 touch $RELNAME/libraries/liblunicode/ucdata/uctable.h
76 if test ! -e $RELNAME/build/version.sh ; then
77 echo "No build version"
80 eval `$RELNAME/build/version.sh`
83 echo "Rolling up $OL_STRING ..."
86 tar cf $RELNAME.tar $RELNAME
87 gzip -9 -c $RELNAME.tar > $RELNAME.tgz
88 ${MD} $RELNAME.tgz > $RELNAME.md5
89 ${SHA} $RELNAME.tgz > $RELNAME.sha1
94 echo "Made $OL_STRING as $RELNAME.tgz"