freebsd-ports/mail/popfile/files/popfile.sh
Makoto Matsushita a3ec21852b Quote variable to avoid unwanted error, even if the pathname
includes spaces.  The content is changed but the previous commit
is a few minutes before, don't bump PORTREVISION to avoid confusion.
2004-03-27 05:19:40 +00:00

25 lines
409 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
case "${HOME}" in
"")
export POPFILE_USER_DEFAULT=/var/db/popfile
;;
*)
export POPFILE_USER_DEFAULT="${HOME}/.popfile"
;;
esac
die()
{
echo "$1"
exit 1
}
export POPFILE_ROOT=%%DATADIR%%
export POPFILE_USER=${POPFILE_USER:-${POPFILE_USER_DEFAULT}}
mkdir -p "${POPFILE_USER}" || die "mkdir ${POPFILE_USER} failed"
cd "${POPFILE_USER}"
%%DATADIR%%/popfile.pl >/dev/null 2>&1 &