From 366b5200155cb5a555af75864b386cb0e995901d Mon Sep 17 00:00:00 2001 From: Wolfgang Müller Date: Wed, 10 Mar 2021 17:01:45 +0100 Subject: Allow overriding the role directory The upcoming test suite needs a way to operate on roles without referencing the system's default store in /etc/portage/stow. Have bosun respect the 'BOSUN_DIR' environment variable that overrides the role directory bosun operates on. --- bosun | 2 +- bosun.1 | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/bosun b/bosun index 5d651a3..c24584f 100755 --- a/bosun +++ b/bosun @@ -1,6 +1,6 @@ #!/bin/sh -export STOW_DIR=/etc/portage/stow +export STOW_DIR=${BOSUN_DIR:-/etc/portage/stow} err() { printf "bosun: %s\n" "$@" >&2 diff --git a/bosun.1 b/bosun.1 index ff50cf8..420d0f8 100644 --- a/bosun.1 +++ b/bosun.1 @@ -1,4 +1,4 @@ -.Dd January 21, 2020 +.Dd March 10, 2021 .Dt BOSUN 1 .Os .Sh NAME @@ -27,7 +27,9 @@ A is a directory comprised of a set of portage configuration files pertaining to a specific service, usage, et cetera. Roles are placed into -.Em /etc/portage/stow . +.Em /etc/portage/stow +or the directory pointed to by +.Ev BOSUN_DIR . .Pp .Nm uses @@ -76,6 +78,14 @@ and If no command is given, .Nm will list active roles. +.Sh ENVIRONMENT +.Bl -tag -width Ds +.It Ev BOSUN_DIR +The base directory containing all portage roles. +See +.Sx FILES +for the default location if this is unset. +.El .Sh FILES .Bl -tag -width Ds .It Pa /etc/portage/stow -- cgit v1.2.3-2-gb3c3