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

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

####
# Configure variables

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

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

PATH="/opt/local/sbin:/opt/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
