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

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

####
# Configure variables

GREP="/usr/sbin/grep"
EGREP="/usr/sbin/grep -E"
GETTEXT="/usr/sbin/gettext"
GNUPLOT=""
GNUTAR="/usr/bin/tar"
STAR="/usr/bin/star"
SAMBA_CLIENT="/usr/bin/smbclient"
GZIP=""
SORT="/usr/sbin/sort"
PERL="/usr/sbin/perl"
AWK="gawk"

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

PATH="/usr/bin:/usr/lib/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
