summaryrefslogtreecommitdiff
path: root/tools/bin
diff options
context:
space:
mode:
authorLorry <lorry@roadtrain.codethink.co.uk>2012-07-20 16:48:06 +0100
committerLorry <lorry@roadtrain.codethink.co.uk>2012-07-20 16:48:06 +0100
commit8e8edc70b402e69953fb9135a58d7faee12dc088 (patch)
treee8815e7ef185ccaba26bcd616eace378572b922e /tools/bin
downloaddocbook-xsl-8e8edc70b402e69953fb9135a58d7faee12dc088.tar.gz
Tarball conversion
Diffstat (limited to 'tools/bin')
-rwxr-xr-xtools/bin/docbook-xsl-update53
1 files changed, 53 insertions, 0 deletions
diff --git a/tools/bin/docbook-xsl-update b/tools/bin/docbook-xsl-update
new file mode 100755
index 0000000..0d44f56
--- /dev/null
+++ b/tools/bin/docbook-xsl-update
@@ -0,0 +1,53 @@
+#!/bin/bash
+# vim: number
+
+# docbook-xsl-update - Update environment to latest docbook-xsl snapshot
+# $Id: docbook-xsl-update 6565 2007-01-29 23:00:16Z xmldoc $
+
+if [ -z $DOCBOOK_MIRROR ]; then
+ myhost=docbook.xml-doc.org:5873;
+else
+ myhost=$DOCBOOK_MIRROR;
+fi
+
+mydir=$(readlink -f $(dirname $0))
+mydocbook_xsl_base=$(readlink -f $(dirname $0)/../..)
+
+if [ ! -f $mydocbook_xsl_base/VERSION ]; then
+ cat <<- EOF
+$(basename $0): error: not in snapshot directory. Stopping.
+
+The $(basename $0) script must be installed within its original
+location in the tools/bin directory in the docbook-xsl distribution.
+EOF
+ exit 1
+fi
+
+usage="Usage:
+
+ $(basename $0) [-h HOST[:PORT]]
+
+ -h HOST[:PORT] Specifies the rsync host and port number to use.
+ If not specified, uses the value of the
+ \$DOCBOOK_MIRROR environment variable. If that
+ environment variable is not specified, defaults
+ to a hard-coded value.
+
+"
+
+while getopts "h:" opt; do
+ case $opt in
+ h ) myhost=$OPTARG ;;
+ \? ) printf "$usage"
+ printf "$opts_admon"
+ exit 1 ;;
+ esac
+done
+
+shift $(($OPTIND - 1))
+
+if [ -z $myhost ]; then
+ myhost=$DOCBOOK_MIRROR
+fi
+
+rsync -auv rsync://$myhost/xsl $mydocbook_xsl_base