Seriously, this removes a warning when the 'list' command was invoked
(either by -L or -c list) and penv could not change to its envdir.
This is especially useful if penv is used as a make(1) environment
processor, as described in my message to -arch today. The previous
versions would complain loudly about nonexistent envdirs for e.g. all
the build, lib and run dependencies.
Happy holidays!
Initialy reported by: Valentin Zahariev <curly@e-card.bg>
Long disregarded by: myself, as merely an annoyance, before
the actual development of the make(1) envproc code,
when it became a *big* noisy annoyance :)
- fix a segfault when no arguments were given to the 'exec' action;
- rework the 'setvar' code, allow setting of empty variables, which
envdir(1) interprets as requests to unset the corresponding env vars;
- replace the printenv(1) invocation with local envdir parsing code
for the 'list' action.
the path to the environment directory to be used.
This allows you to do neat things like:
[roam@straylight:v0 /usr/ports/textproc/docproj]$ mkdir -p `penv -p`
[roam@straylight:v0 /usr/ports/textproc/docproj]$ echo no > `penv -p`/JADETEX
[roam@straylight:v0 /usr/ports/textproc/docproj]$ echo yes > `penv -p`/A4
[roam@straylight:v0 /usr/ports/textproc/docproj]$ penv -L
JADETEX=no
A4=yes
[roam@straylight:v0 /usr/ports/textproc/docproj]$ penv make clean all install
..and watch the port build fly!
changes without executing anything. Also, the config file path,
the paths to envdir and printenv and the database dir path are now
dynamically adjusted in both the manual page and the sample config file.
penv - 'program environment' or 'ports environment' - is a simple
utility that executes a given command after setting some environment
variables corresponding to the current directory. This makes it
much easier to keep persistent environment settings for building
the same ports over and over again.
For example, the following series of commands:
$ echo cp1251 > /var/db/penv/databases/mysql323-server/WITH_CHARSET
$ echo all > /var/db/penv/databases/mysql323-server/WITH_XCHARSET
..allows a simple way to build the MySQL-3.23 server with the same
character set configuration every time by doing:
[root@ringworld:/usr/ports/databases/mysql323-server]# penv make
For more information, see the penv.1 manual page and the sample
configuration file in the penv distribution.