2018-12-05 16:51:19 -05:00
|
|
|
import os
|
2018-12-01 14:24:43 -05:00
|
|
|
from subprocess import call
|
2018-12-05 16:51:19 -05:00
|
|
|
from pathlib import Path
|
|
|
|
|
2018-12-01 14:24:43 -05:00
|
|
|
from lib.parse import Package
|
|
|
|
|
2018-12-05 16:51:19 -05:00
|
|
|
def install(package):
|
|
|
|
if not package.source:
|
|
|
|
return
|
|
|
|
|
|
|
|
def copy_config(package):
|
|
|
|
if not package.config:
|
|
|
|
return
|
|
|
|
|
|
|
|
def run_script(package):
|
|
|
|
if not package.script:
|
|
|
|
return
|
|
|
|
|
|
|
|
def enable_units(package):
|
|
|
|
if not package.userunits:
|
|
|
|
return
|
|
|
|
|
2018-12-01 14:24:43 -05:00
|
|
|
def configure(package):
|
2018-12-05 16:51:19 -05:00
|
|
|
print(vars(package))
|
|
|
|
install(package)
|
|
|
|
copy_config(package)
|
|
|
|
run_script(package)
|
|
|
|
enable_units(package)
|
|
|
|
|