summaryrefslogtreecommitdiff
path: root/doc-build/mate-doc-common.in
diff options
context:
space:
mode:
authorPerberos <[email protected]>2011-12-01 21:46:33 -0300
committerPerberos <[email protected]>2011-12-01 21:46:33 -0300
commit9d1d71a22f9acf0c5c283064b805166ad612013b (patch)
tree10546fa370323cb9468ab9da26a36eb2147037b9 /doc-build/mate-doc-common.in
downloadmate-common-9d1d71a22f9acf0c5c283064b805166ad612013b.tar.bz2
mate-common-9d1d71a22f9acf0c5c283064b805166ad612013b.tar.xz
moving from https://github.com/perberos/mate-desktop-environment
Diffstat (limited to 'doc-build/mate-doc-common.in')
-rw-r--r--doc-build/mate-doc-common.in49
1 files changed, 49 insertions, 0 deletions
diff --git a/doc-build/mate-doc-common.in b/doc-build/mate-doc-common.in
new file mode 100644
index 0000000..b2216da
--- /dev/null
+++ b/doc-build/mate-doc-common.in
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+progname=`echo "$0" | sed 's%^.*/%%'`
+
+PROGRAM=mate-doc-common
+PACKAGE=@PACKAGE@
+VERSION=@VERSION@
+
+prefix=@prefix@
+datarootdir=@datarootdir@
+datadir=@datadir@
+
+# options
+docdir=.
+copy=no
+
+while test $# -gt 0; do
+ case "$1" in
+ --help)
+ echo "usage: $progname [--version|--help]" 1>&2
+ exit 1 ;;
+ --version)
+ echo "$PROGRAM ($PACKAGE) $VERSION"
+ exit 0 ;;
+ --copy)
+ copy=yes
+ shift ;;
+ -*)
+ echo "$progname: unrecognised option '$1'" 1>&2
+ echo "usage: $progname [--version|--help]" 1>&2
+ exit 1 ;;
+ *)
+ echo "$progname: too many arguments" 1>&2
+ echo "usage: $progname [--version|--help]" 1>&2
+ exit 1 ;;
+ esac
+done
+
+for file in omf.make xmldocs.make; do
+ rm -f $docdir/$file
+ if test "$copy" = yes; then
+ cp -f $datadir/$PACKAGE/data/$file $docdir/ ||
+ exit 1
+ else
+ ln -sf $datadir/$PACKAGE/data/$file $docdir/ ||
+ cp -f $datadir/$PACKAGE/data/$file $docdir/ ||
+ exit 1
+ fi
+done