summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_install/lib/lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pkg_install/lib/lib.h')
-rw-r--r--usr.sbin/pkg_install/lib/lib.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.sbin/pkg_install/lib/lib.h b/usr.sbin/pkg_install/lib/lib.h
index 14d4377..cfa95ca 100644
--- a/usr.sbin/pkg_install/lib/lib.h
+++ b/usr.sbin/pkg_install/lib/lib.h
@@ -57,6 +57,13 @@
/* Usually "rm", but often "echo" during debugging! */
#define RMDIR_CMD "/bin/rmdir"
+/* Where the ports lives by default */
+#define DEF_PORTS_DIR "/usr/ports"
+/* just in case we change the environment variable name */
+#define PORTSDIR "PORTSDIR"
+/* macro to get name of directory where the ports lives */
+#define PORTS_DIR (getenv(PORTSDIR) ? getenv(PORTSDIR) : 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 */
OpenPOWER on IntegriCloud