aboutsummaryrefslogtreecommitdiff
path: root/mail/popfile
diff options
context:
space:
mode:
authorMakoto Matsushita <matusita@FreeBSD.org>2004-03-27 05:11:21 +0000
committerMakoto Matsushita <matusita@FreeBSD.org>2004-03-27 05:11:21 +0000
commit2cd3b953205fc6686fac10c22330d89ab694e871 (patch)
tree8da7d33ed24a9352612db1af09b16e06652ce7bd /mail/popfile
parent258beff3f6cec581843d245a9763f1be68dc4eb2 (diff)
downloadports-2cd3b953205fc6686fac10c22330d89ab694e871.tar.gz
ports-2cd3b953205fc6686fac10c22330d89ab694e871.zip
Notes
Diffstat (limited to 'mail/popfile')
-rw-r--r--mail/popfile/Makefile2
-rw-r--r--mail/popfile/files/popfile.sh19
2 files changed, 18 insertions, 3 deletions
diff --git a/mail/popfile/Makefile b/mail/popfile/Makefile
index 2ddca2cdbbee..3b9489c1142c 100644
--- a/mail/popfile/Makefile
+++ b/mail/popfile/Makefile
@@ -7,7 +7,7 @@
PORTNAME= popfile
PORTVERSION= 0.21.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/mail/popfile/files/popfile.sh b/mail/popfile/files/popfile.sh
index ad7345fd456c..21caf2b8fe51 100644
--- a/mail/popfile/files/popfile.sh
+++ b/mail/popfile/files/popfile.sh
@@ -2,9 +2,24 @@
#
# $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=${HOME}/.popfile
+export POPFILE_USER=${POPFILE_USER:-${POPFILE_USER_DEFAULT}}
-mkdir -p ${POPFILE_USER}
+mkdir -p ${POPFILE_USER} || die "mkdir ${POPFILE_USER} failed"
cd ${POPFILE_USER}
%%DATADIR%%/popfile.pl >/dev/null 2>&1 &