Imported Upstream version 2.5.2p1
[debian/amanda] / changer-src / chg-lib.sh.in
1 ################################################################################
2 # You may want to customize these values
3 ################################################################################
4
5 # These are the defaults discovered by configure when Amanda was installed.
6 # They can be overridden here, or by by 'mt_binary' and 'mtx_binary', 
7 # respectively, in the changerfile (currently only for chg-zd-mtx.sh and
8 # chg-manual.sh).
9
10 MT=@MT@
11 MTX=@MTX@
12
13 # This is the flag used to specify a device filename to 'mt', usually '-f'
14 MTF=@MT_FILE_FLAG@
15
16 ################################################################################
17 # No user-level customization should be required beyond this point.
18 ################################################################################
19
20 ####
21 # Set up paths, including PATH for finding amanda executables
22
23 PATH="$PATH:@sbindir@:@libexecdir@"
24 prefix="@prefix@"
25 exec_prefix="@exec_prefix@"
26 sbindir="@sbindir@"
27 libexecdir="@libexecdir@"
28
29 ####
30 # Gettext
31
32 #+
33 # Function to:
34 #    Simplify gettext usage by allowing printf format
35 #    strings for translators, use _() identifier for
36 #    xgettext extraction similar to "C" usage and
37 #    collapsing "printf `gettext fmt` ...", which is
38 #    used everywhere, into one function.
39 #-
40 _() {
41         fmt=`gettext -d amanda "$1"`
42         shift
43         printf "$fmt" $*
44 }
45
46 ####
47 # Eponymous functions to access various amanda apps
48
49 if test "@USE_VERSION_SUFFIXES@" = "yes"; then
50     amgetconf() {
51         "${sbindir}/amgetconf-@VERSION@" "${@}"
52     }
53     ammt() {
54         "${sbindir}/ammt-@VERSION@" "${@}"
55     }
56     amdd() {
57         "${sbindir}/amdd-@VERSION@" "${@}"
58     }
59 else
60     amgetconf() {
61         "${sbindir}/amgetconf" "${@}"
62     }
63     amdd() {
64         "${sbindir}/amdd" "${@}"
65     }
66     amdd() {
67         "${sbindir}/amdd" "${@}"
68     }
69 fi