summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/updating/pathnames.h
blob: d5ec1a077c45beedb3cf717bb67c254cc8ec58e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*-
 * ----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <beat@chruetertee.ch> wrote this file. As long as you retain this notice you
 * can do whatever you want with this stuff. If we meet some day, and you think
 * this stuff is worth it, you can buy me a beer in return.          Beat Gätzi
 * ----------------------------------------------------------------------------
 *
 * $FreeBSD$
 *
 */

/* Copy from ../version/version.h */

/* Where the ports lives by default */
#define DEF_PORTS_DIR "/usr/ports/UPDATING"
/* just in case we change the environment variable name */
#define PORTSDIR  "PORTSDIR"
/* macro to get name of directory where we put logging information */
#define UPDATING (getenv(PORTSDIR) ? strcat(getenv(PORTSDIR), \
	"/UPDATING") : DEF_PORTS_DIR)

/* Where we put logging information by default, else ${PKG_DBDIR} if set */
#define DEF_LOG_DIR	"/var/db/pkg"
/* just in case we change the environment variable name */
#define PKG_DBDIR	"PKG_DBDIR"
/* macro to get name of directory where we put logging information */
#define LOG_DIR		(getenv(PKG_DBDIR) ? getenv(PKG_DBDIR) : DEF_LOG_DIR)
OpenPOWER on IntegriCloud