Début génération d'images pour construction des paquets via acbuild

This commit is contained in:
2017-01-19 22:56:17 +01:00
parent 8469bf2c08
commit b88493523f
3 changed files with 83 additions and 49 deletions

View File

@ -1,9 +1,23 @@
import os, glob, subprocess
import os, glob, subprocess, configparser
import web, system
def load_profile(profile_name):
profile_filename = profile_name+".conf"
for profile_file in get_available_profiles():
if profile_filename == os.path.basename(profile_file):
config = configparser.ConfigParser()
config.read(profile_file)
return config
return None
def get_profiles_dir():
return os.path.realpath(os.path.dirname(os.path.abspath(__file__)) + "/../profiles")
def get_available_profiles():
profiles_dir = os.path.realpath(os.path.dirname(os.path.abspath(__file__)) + "/../profiles")
profile_files = glob.glob(profiles_dir + '/*.conf')
return glob.glob(get_profiles_dir() + '/*.conf')
def get_available_profile_names():
profile_files = get_available_profiles()
return [os.path.splitext(os.path.basename(f))[0] for f in profile_files]
def get_workspace_dir():