s4:rpc_server/srvsvc: remove unused ZERO_STRUCT(r->out);
[Samba/kamenim.git] / packaging / bin / fill-templates
blobcbd49337ed7d5a9195d84a66c59c27ed62551ebf
1 #!/bin/sh
3 # Script to fill the packaging templates with the version
4 # information that is created by mkversion in advance.
6 # This is a standalone wrapper for update-pkginfo, which
7 # is usually called from release-scripts/create-tarball.
8 # This allows for testing some aspects of packaging without
9 # the need to go through all of create-tarball.
11 # Copyright (C) Michael Adam 2009
13 # License: GPL
15 DIRNAME=$(dirname $0)
16 TOPDIR=${DIRNAME}/../..
17 SRCDIR=${TOPDIR}/source3
18 VERSION_H=${SRCDIR}/include/version.h
20 pushd ${SRCDIR} > /dev/null 2>&1
21 ./script/mkversion.sh
22 popd > /dev/null 2>&1
24 if [ ! -f ${VERSION_H} ] ; then
25 echo "Error creating version.h"
26 exit 1
29 VERSION=`grep "define SAMBA_VERSION_OFFICIAL_STRING" ${VERSION_H} | awk '{print $3}'`
31 vendor_version=`grep "define SAMBA_VERSION_VENDOR_SUFFIX" ${VERSION_H} | awk '{print $3}'`
32 if test "x${vendor_version}" != "x" ; then
33 VERSION="${VERSION}-${vendor_version}"
36 vendor_patch=`grep "define SAMBA_VERSION_VENDOR_PATCH" ${VERSION_H} | awk '{print $3}'`
37 if test "x${vendor_patch}" != "x" ; then
38 VERSION="${VERSION}-${vendor_patch}"
41 VERSION=`echo ${VERSION} | sed 's/\"//g'`
43 echo "VERSION: ${VERSION}"
45 pushd ${TOPDIR}/packaging > /dev/null 2>&1
46 ./bin/update-pkginfo "${VERSION}" 1 ""
47 popd > /dev/null 2>&1