| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | set -ex |
| 4 | |
| 5 | UPSTREAM_VERSION=$2 |
| 6 | UPSTREAM_VERSION_REV=`echoscip-shell system . . echo. ${UPSTREAM_VERSION} | sedscip-shell system . . sed. -e "s/^2.0.17+svn//g"` |
| 7 | ORIG_TARBALL=$3 |
| 8 | |
| 9 | REAL_TARBALL=`readlinkscip-shell system . . readlink. -f ${ORIG_TARBALL}` |
| 10 | WORKING_DIR=`dirnamescip-shell system . . dirname. ${ORIG_TARBALL}` |
| 11 | |
| 12 | ORIG_TARBALL_NEW="${WORKING_DIR}/docbook-defguide_${UPSTREAM_VERSION}.orig.tar.gz" |
| 13 | ORIG_TARBALL_DIR="${WORKING_DIR}/docbook-defguide-${UPSTREAM_VERSION}.orig" |
| 14 | ORIG_TARBALL_DIR_STRIP=`basenamescip-shell system . . basename. ${ORIG_TARBALL_DIR}` |
| 15 | |
| 16 | [scip-shell system . . `[`. ! -e ${ORIG_TARBALL_DIR} ] || exit 1 |
| 17 | svn export -r ${UPSTREAM_VERSION_REV} -q --non-interactive --ignore-keywords svn://svn.code.sf.net/p/docbook/code/trunk/defguide ${ORIG_TARBALL_DIR} || exit 1 |
| 18 | |
| 19 | rmscip-shell system . . rm. -f ${ORIG_TARBALL} ${REAL_TARBALL} |
| 20 | GZIP="-n -9" tarscip-shell system . . tar. --remove-files --directory ${WORKING_DIR} -czf ${ORIG_TARBALL_NEW} ${ORIG_TARBALL_DIR_STRIP} || exit 1 |
| 21 | |
| 22 | exit 0 |