#!/bin/sh set -e PACKAGE=khronos-opencl-man VERSION=${VERSION:-$2} TARFILE=${TARFILE:-$3} if [ -z ${VERSION}]; then VERSION=`dpkg-parsechangelog | sed -n -e 's/^Version: \(.*\)-[^-]*$/\1/p'` fi REVISION=`echo $VERSION | sed -e 's/^.*svn//g'` if [ -z ${TARFILE}]; then TARFILE=${PACKAGE}_${VERSION}.orig.tar.gz fi FOLDER=${PACKAGE}-${VERSION} URL=https://cvs.khronos.org/svn/repos/registry/trunk/public/cl/sdk/1.2/docs/man svn export --quiet --revision ${REVISION} ${URL} ${FOLDER} # we will re-generate them anyway: find ${FOLDER}/xhtml -name \*.html -not -name index.html -not -name Opencl_header.html -not -name Opencl_tofc.html -not -name oclRefPages-Title.html -delete URL2=https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/docs/man4 cd ${FOLDER} svn export --quiet $URL2/Makefile svn export --quiet $URL2/usr cd .. GZIP="--best --no-name" tar --exclude-vcs -czf ${TARFILE} ${FOLDER} rm -rf ${FOLDER}