|
Lines 1-4
Link Here
|
| 1 |
#!/usr/local/bin/python |
1 |
#!/usr/local/bin/python2.7 |
| 2 |
# |
2 |
# |
| 3 |
# Author: Jordan Sissel |
3 |
# Author: Jordan Sissel |
| 4 |
# |
4 |
# |
|
Lines 84-90
Link Here
|
| 84 |
def GetVariable(varname): |
84 |
def GetVariable(varname): |
| 85 |
if varname in os.environ: |
85 |
if varname in os.environ: |
| 86 |
return os.environ[varname] |
86 |
return os.environ[varname] |
| 87 |
make = "make -f /usr/ports/Makefile -V %s" % varname |
87 |
MYPORTSDIR=subprocess.Popen(["/usr/bin/make", "-V", "PORTSDIR"], stdout=subprocess.PIPE) |
|
|
88 |
PORTSDIR=MYPORTSDIR.communicate()[0] |
| 89 |
make = "make -f %s/Makefile -V %s" % (PORTSDIR.replace("\n",""), varname) |
| 88 |
value = Run(make) |
90 |
value = Run(make) |
| 89 |
if value[-1] == "\n": |
91 |
if value[-1] == "\n": |
| 90 |
value = value[:-1] |
92 |
value = value[:-1] |