# Shell library containing functions and definitions common to amanda's
# shell scripts and wrappers.

# Include this file as follows:
#   prefix="/usr/local"
#   exec_prefix="${prefix}"
#   amlibexecdir="/usr/local/libexec/amanda"
#   . "${amlibexecdir}/amanda-sh-lib.sh"

####
# Configure variables

GREP="/usr/bin/grep"
EGREP="/usr/bin/grep -E"
GETTEXT="/usr/local/bin/gettext"
GNUPLOT=""
GNUTAR="/usr/local/bin/gtar"
STAR=""
SAMBA_CLIENT=""
GZIP=""
SORT="/usr/bin/sort"
PERL="/usr/local/bin/perl-amanda"
AWK="nawk"

####
# Set up PATH for finding amanda executables

PATH="/usr/local/sbin:/usr/local/libexec/amanda:$PATH"

####
# Gettext

# use as follows:
#   echo `_ "%s: '%s' is not executable" "$myname" "$binpath"`
# NOTE: use a text editor with shell syntax hilighting to avoid
# quoting errors!

if test -n "$GETTEXT"; then
    _() {
	    fmt=`$GETTEXT -d amanda "$1"`
	    shift
	    printf "$fmt" "$@"
    }
else
    _() {
	printf "$@"
    }
fi
