forked from serkus/webport
parent
e0ca2ea70c
commit
67dd6e48ba
@ -1,5 +1,10 @@
|
||||
{
|
||||
"Server":{
|
||||
"PORT": 8000,
|
||||
"Lang": "ru",
|
||||
"THEME": "default"
|
||||
},
|
||||
"Portage":{
|
||||
"make.conf":"/etc/portge/make.conf/custom"
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,31 @@
|
||||
#-*- codding:UTF-8 -*-
|
||||
#!/usr/bin/env python
|
||||
import os, sys, json
|
||||
from utils import load_config
|
||||
def parseMakeConf():
|
||||
Config = load_config()
|
||||
|
||||
TargetParse =['USE', 'USE_EXPAN', 'VIDEO_CARDS', 'ACCEPT_CHOSTS', 'ACCEPT_LICENSE','CCACHE_DIR', 'CCACHE_SIZE',
|
||||
'EMERGE_DEFAULT_OPTS', 'CFLAGS', 'CXXFLAGS', 'MAKEOPTS']
|
||||
|
||||
StateBox = 'Null'
|
||||
MakeConfig={}
|
||||
with open (Config.Portage['make.conf'], 'r') as f:
|
||||
lines = f.read().split("\n")
|
||||
|
||||
for line in lines:
|
||||
if not line.startswith('#'):
|
||||
if StateBox is 'Null' and not line.endswith('"'):
|
||||
if not line.endswith('"')
|
||||
StateBox = line.split('=')[0]
|
||||
MakeConfig[StateBox] = line.split('=')[]
|
||||
else:
|
||||
pass
|
||||
|
||||
else:
|
||||
pass
|
||||
print(MakeConfig)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
parseMakeConfig()
|
Loading…
Reference in new issue