where are the portfiles?

Ryan Schmidt ryandesign at macports.org
Sat Jul 14 17:57:45 PDT 2007


On Jul 14, 2007, at 16:42, olivier SAINT-EVE wrote:

> I would like to know where are the portfiles and what is their  
> extension.
> I tried "sudo port edit myport" but I have a message telling me I  
> have not the permission for this action.

"port file myport" will show you were the portfile is, or "port dir  
myport" will show you the directory it's in. Go up two directories  
from that, and that's where you'll find all portfiles.

Portfiles have the name "Portfile" with no extension. I've asked a  
couple times whether it wouldn't be useful to start using an  
extension, such as .tcl, but I don't think I got any replies.

I routinely use "port edit myport" to edit a portfile. I don't know  
why you got an error. Is your EDITOR environment variable set up  
correctly? Pointing to an editor you'd like to use?

For example on my system I have this in my ~/.bash_profile:

export EDITOR=~/scripts/editor.sh

And then in ~/scripts/editor.sh I have:

#!/bin/sh
edit +1 --wait --resume "$@"

"edit" is the command to invoke TextWrangler, which is the text  
editor I like to use. Other GUI editors may have their own commands  
you can use to open a file into them.






More information about the macports-users mailing list