suse-xsl-stylesheets/susexsl-fetch-source-svn
Frank Sundermeyer 8eb150b6da New release 2.0~rc5
New Features:
 * support for DocBook5 - the xsl-ns variants are located in the following
   directories:
   -  /usr/share/xml/docbook/stylesheet/daps2013-ns
   -  /usr/share/xml/docbook/stylesheet/opensuse2013-ns
   -  /usr/share/xml/docbook/stylesheet/suse-ns
   -  /usr/share/xml/docbook/stylesheet/suse2013-ns
 * the DocBook5 variants are automatically generated with a slghtly adopted
   version of xslns-build from upstream
 * SUSE aspell dictionary was moved from DAPS to this package; wordlist
   was updated
 * started a NovDoc version for DocBook 5: susedoc5
Bugfixes:
 * language fixes for Chinese, Korean, and Japanese
 * Fixed issue #29: Make Parameter runinhead.default.title.end.punct
   L10N Compatible
 * Fixed sf-issue #246 Allow More Information in Side Regions When in Draft Mode
 * Fixed sf-issue #243 Support Sorting of Acronym in Glossaries in HTML
 * Fixed sf-issue #241:  Allow dir attribute in Novdoc DTD
 * Fixed bold.replacement.color and italic.replacement.color parameter for XEP
 * Fix for guimenus: Use 'inherit' instead of 'transparent' as this value
   seems not supported by XEP.
 * Novdoc: Missing remap for ulink added

OBS-URL: https://build.opensuse.org/package/show/Documentation:Tools/suse-xsl-stylesheets?expand=0&rev=88
2015-04-24 21:42:44 +00:00

90 lines
2.3 KiB
Bash

#!/bin/bash
#
# Create suse-xsl-stylesheet source tarball from SVN
#
# Copyright (C) 2011,2012 Frank Sundermeyer <fsundermeyer@opensuse.org>
#
# Author:
# Frank Sundermeyer <fsundermeyer@opensuse.org>
#set -x
NAME=suse-xsl-stylesheets
VERSION=
SPECFILE=${NAME}.spec
SRC_DIR=suse
NOVDOC_DIR=schema
SVNPATH=svn://svn.code.sf.net/p/daps/svn/trunk/daps
TMPDIR=$(mktemp -q -d --tmpdir susexsl_XXXXXXXX)
EXCLUDES=${TMPDIR}/${NAME}/${SRC_DIR}/packaging/exclude-files_for_susexsl_package.txt
#----------
# Functions
#----------
# exit on error
#
function exit_on_error {
echo -e "$1"
#rm -rf $TMPDIR
exit 1
}
#-----
# MAIN
#-----
#
# This script needs to be called from the suse-xsl-stylesheet osc checkout
# directory, so lets check whethter we are in the correct directory
#
if [[ ! -s ${NAME}.spec && ! -d .osc ]]; then
echo "Looks like you are not in the ${NAME} checkout directory."
read -p "Continue anyway (y/n) [n]: " CONT
if [[ n = $CONT || N = $CONT ]]; then
exit_on_error "Aborted by user."
fi
fi
#
# Export daps from SVN
#
svn export -q $SVNPATH ${TMPDIR}/${NAME} || exit_on_error "SVN export failed"
#
# Get the version number
#
VERSION=$(egrep "^Version:\s*" ${TMPDIR}/${NAME}/${SRC_DIR}/packaging/$SPECFILE | sed 's/^Version:\s*//')
if [[ -z $VERSION ]]; then
exit_on_error "Couldn't get version number from spec-file."
fi
#
# Create the tarball
#
export BZIP2=--best
tar cfh ${NAME}-${VERSION}.tar -C ${TMPDIR}/${NAME} \
--exclude-from=$EXCLUDES --transform=s:suse/:suse-xsl-stylesheets/: \
${SRC_DIR} || exit_on_error "Failed to create the tarball."
# suse/aspell is excluded from tarball, because we only need one file, which we
# manually add here
tar rf ${NAME}-${VERSION}.tar -C ${TMPDIR}/${NAME} \
--transform=s:suse:suse-xsl-stylesheets: \
${SRC_DIR}/aspell/suse_aspell.rws || exit_on_error "Failed to add aspell dictionary to the tarball."
bzip2 -9f ${NAME}-${VERSION}.tar
echo "Successfully created ${NAME}-${VERSION}.tar.bz2"
#
# Copy the spec file if necessary
#
diff -q $SPECFILE ${TMPDIR}/${NAME}/${SRC_DIR}/packaging/$SPECFILE >/dev/null
if [[ 0 = $? ]]; then
echo "spec file is up-to-date"
else
cp ${TMPDIR}/${NAME}/${SRC_DIR}/packaging/$SPECFILE . || exit_on_error "Failed to copy the specfile."
echo "Successfully updated the spec file."
fi
rm -rf ${TMPDIR}
exit 0