is a wrapper. It consecutively runs:
If PORTEDITOR is defined in the environment then that program will be used to edit
file. If PORTEDITOR is not defined but EDITOR is defined, then the EDITOR program
will be invoked. If neither variable is defined in the environment, then
will be invoked for the edit step.
should be launched when the current working directory is equal to the ports WRKSRC, and
should be a relative path to file that needs a patch. Assuming changes are saved after
the editor appears, a patch file will be automatically generated in the proper diff format
with the standard "make makepatch" naming convention. It only needs to be moved to the
ports "files" directory to be used.
is launched outside of the ports WRKSRC, then diff output will still be generated, but it
will be sent to stdout rather than to a file. This will also occur when the port is located
outside of the standard tree.
The script will abort if the number of arguments does not equal one, or if the one argument
is not an existing regular file.
If the editor is closed without making changes, no patch will be created. However, the
duplicated file will exist. If the script is run again, it will detect the duplicate and
create a second duplicate with the .intermediate extension. See
for more information.