source: trunk/server/packaging/bin/fill-templates@ 1036

Last change on this file since 1036 was 414, checked in by Herwig Bauernfeind, 16 years ago

Samba 3.5.0: Initial import

File size: 1.2 KB
Line 
1#!/bin/sh
2
3# Script to fill the packaging templates with the version
4# information that is created by mkversion in advance.
5#
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.
10#
11# Copyright (C) Michael Adam 2009
12#
13# License: GPL
14
15DIRNAME=$(dirname $0)
16TOPDIR=${DIRNAME}/../..
17SRCDIR=${TOPDIR}/source3
18VERSION_H=${SRCDIR}/include/version.h
19
20pushd ${SRCDIR} > /dev/null 2>&1
21./script/mkversion.sh
22popd > /dev/null 2>&1
23
24if [ ! -f ${VERSION_H} ] ; then
25 echo "Error creating version.h"
26 exit 1
27fi
28
29VERSION=`grep "define SAMBA_VERSION_OFFICIAL_STRING" ${VERSION_H} | awk '{print $3}'`
30
31vendor_version=`grep "define SAMBA_VERSION_VENDOR_SUFFIX" ${VERSION_H} | awk '{print $3}'`
32if test "x${vendor_version}" != "x" ; then
33 VERSION="${VERSION}-${vendor_version}"
34fi
35
36vendor_patch=`grep "define SAMBA_VERSION_VENDOR_PATCH" ${VERSION_H} | awk '{print $3}'`
37if test "x${vendor_patch}" != "x" ; then
38 VERSION="${VERSION}-${vendor_patch}"
39fi
40
41VERSION=`echo ${VERSION} | sed 's/\"//g'`
42
43echo "VERSION: ${VERSION}"
44
45pushd ${TOPDIR}/packaging > /dev/null 2>&1
46./bin/update-pkginfo "${VERSION}" 1 ""
47popd > /dev/null 2>&1
Note: See TracBrowser for help on using the repository browser.