Imported Debian patch 2.5.2p1-1
[debian/amanda] / changer-src / chg-lib.sh.in
diff --git a/changer-src/chg-lib.sh.in b/changer-src/chg-lib.sh.in
new file mode 100644 (file)
index 0000000..2df29bf
--- /dev/null
@@ -0,0 +1,69 @@
+################################################################################
+# You may want to customize these values
+################################################################################
+
+# These are the defaults discovered by configure when Amanda was installed.
+# They can be overridden here, or by by 'mt_binary' and 'mtx_binary', 
+# respectively, in the changerfile (currently only for chg-zd-mtx.sh and
+# chg-manual.sh).
+
+MT=@MT@
+MTX=@MTX@
+
+# This is the flag used to specify a device filename to 'mt', usually '-f'
+MTF=@MT_FILE_FLAG@
+
+################################################################################
+# No user-level customization should be required beyond this point.
+################################################################################
+
+####
+# Set up paths, including PATH for finding amanda executables
+
+PATH="$PATH:@sbindir@:@libexecdir@"
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+sbindir="@sbindir@"
+libexecdir="@libexecdir@"
+
+####
+# Gettext
+
+#+
+# Function to:
+#    Simplify gettext usage by allowing printf format
+#    strings for translators, use _() identifier for
+#    xgettext extraction similar to "C" usage and
+#    collapsing "printf `gettext fmt` ...", which is
+#    used everywhere, into one function.
+#-
+_() {
+       fmt=`gettext -d amanda "$1"`
+       shift
+       printf "$fmt" $*
+}
+
+####
+# Eponymous functions to access various amanda apps
+
+if test "@USE_VERSION_SUFFIXES@" = "yes"; then
+    amgetconf() {
+        "${sbindir}/amgetconf-@VERSION@" "${@}"
+    }
+    ammt() {
+        "${sbindir}/ammt-@VERSION@" "${@}"
+    }
+    amdd() {
+        "${sbindir}/amdd-@VERSION@" "${@}"
+    }
+else
+    amgetconf() {
+        "${sbindir}/amgetconf" "${@}"
+    }
+    amdd() {
+        "${sbindir}/amdd" "${@}"
+    }
+    amdd() {
+        "${sbindir}/amdd" "${@}"
+    }
+fi