Switch the instance_reboot rpc to (status, data)
[ganeti-local] / autotools / docbook-wrapper
index 9f53b6d..f525f16 100755 (executable)
@@ -2,23 +2,20 @@
 
 set -e
 
-input="${1}"
-output="${2}"
+if test "$#" != 3
+then
+  echo "Wrong number of arguments." >&2
+  exit 1
+fi
+
+cmd="${1}"
+input="${2}"
+output="${3}"
 
 # docbook2man inserts a date formatted using the current locale into its
 # output. Using the "C" locale makes sure it's always in the default format.
 export LC_ALL=C
 
-case "${output}" in
-  *.pdf) cmd=docbook2pdf ;;
-  *.html) cmd='docbook2html --nochunks' ;;
-  *.7|*.8) cmd=docbook2man ;;
-  *)
-    echo "Unknown filetype: ${output}" >&2
-    exit 1
-  ;;
-esac
-
 tmpdir=`mktemp -d`
 trap "rm -rf ${tmpdir}" EXIT
 
@@ -27,7 +24,7 @@ if ! ( cd `dirname ${input}` &&
 then
   echo "Building ${output} failed." >&2
   exit 1
-fi;
+fi
 
 mv "${tmpdir}/`basename "${output}"`" "${output}"