tools/ctdb: Pass memory context for returning nodes in parse_nodestring
[Samba/wip.git] / ctdb / libctdb / test / tools / create-links
blob265efc17ee9c55ff303e4fb1b39125192f159ae3
1 #!/bin/sh
2 # Create docbook-xml links
4 # most things will be under this path.
5 DOCB=/usr/share/sgml/docbook
7 # potential location for xhtml/docbook.xsl
8 XSLDIRS="$DOCB/xsl-stylesheets* $DOCB/stylesheet/xsl/nwalsh"
10 # potential location for docbookx.dtd
11 DTDDIRS="$DOCB/xml-dtd* $DOCB/dtd/xml/*"
13 # look for a file (arg 1) in a set of dirs (arg 2). If it exists, create a link
14 # (arg 3), in the current directory to the dir.
15 condlink() {
16 file=$1
17 dirs=$2
18 link=$3
20 for d in $dirs
22 if [ -f $d/$file ]
23 then
24 dir=$d
25 break
27 done
29 if [ -z "$dir" ]
30 then
31 echo Docbook support not found. See README. Faking it. >&2
32 exit 1
33 else
34 ln -sfn "$dir" "$link"
38 condlink "xhtml/docbook.xsl" "$XSLDIRS" "link-xhtml"
39 condlink "docbookx.dtd" "$DTDDIRS" "link-dtd"