63 lines
1.4 KiB
Groff
63 lines
1.4 KiB
Groff
.Dd June 5, 2022
|
|
.Dt TIX-VARS 8
|
|
.Os
|
|
.Sh NAME
|
|
.Nm tix-vars
|
|
.Nd evaluate variables in port files
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Fl rtv
|
|
.Op Fl d Ar default
|
|
.Ar file
|
|
.Op Ar variable-or-assignment ...
|
|
.Sh DESCRIPTION
|
|
.Nm
|
|
evaluates the variables in the
|
|
.Xr port 5
|
|
named by
|
|
.Ar file
|
|
or the standard input if
|
|
.Ar file
|
|
is
|
|
.Sq - .
|
|
.Nm
|
|
considers the assignments and variables in the order of its arguments.
|
|
If an argument is in the format
|
|
.Ar variable Ns Li = Ns Ar value ,
|
|
then the
|
|
.Ar variable
|
|
is assigned to the
|
|
.Ar value .
|
|
Otherwise the argument names a variable, whose raw value is written on a line.
|
|
If no variables were requested, then all variables are written in a normalized
|
|
form as lines with an equals sign
|
|
.Sq =
|
|
separating the variable name and the value (quoted as needed).
|
|
.Pp
|
|
The options are as follows:
|
|
.Bl -tag -width "12345678"
|
|
.It Fl d Ar default
|
|
Use the
|
|
.Ar default
|
|
value instead if the variable is unset.
|
|
.It Fl r
|
|
Write the raw values with no quoting.
|
|
.It Fl t
|
|
Test quietly whether the file is syntactically correct and whether the variables
|
|
are set without writing their contents.
|
|
.It Fl v
|
|
Always include the variable names as an assignment where the value is quoted
|
|
as needed.
|
|
.El
|
|
.Sh EXIT STATUS
|
|
.Nm
|
|
will exit 0 on success,
|
|
exit 1 on a syntax error or if the requested variable is unset,
|
|
and exit 2 otherwise.
|
|
.Sh SEE ALSO
|
|
.Xr port 5 ,
|
|
.Xr tix-build 8 ,
|
|
.Xr tix-port 8
|
|
.Sh HISTORY
|
|
.Nm
|
|
originally appeared in Sortix 1.1.
|