using utils.ensure_dir in the conf_setup instead of running a bash command to make the needed directories for readmes and confs. also modified layout.yml because i wanted to separate the home name for the fabric install from the directory it's meant to be installed, and i had both on, so it was duplicating the home name, ie usr/bin/fabrichome/fabrichome
This commit is contained in:
parent
0941b2de59
commit
dbc5638eac
2 changed files with 7 additions and 3 deletions
|
|
@ -5,6 +5,7 @@ from fabric.api import env, task
|
|||
import os
|
||||
import sys
|
||||
import pathlib
|
||||
import modules.utils as modules_utils
|
||||
|
||||
dir_parent = pathlib.Path(os.path.abspath(__file__)).parents[2]
|
||||
sys.path.append(str(dir_parent))
|
||||
|
|
@ -229,6 +230,7 @@ def deploy_readmes():
|
|||
and puts then under the top level of the project/scripts directory
|
||||
"""
|
||||
configuration = env.config
|
||||
|
||||
source_readmes = configuration.tools.fabric.templates.readmes
|
||||
|
||||
dest_readmes = os.path.join(
|
||||
|
|
@ -260,7 +262,8 @@ def deploy_conf():
|
|||
build_dir = os.path.join(dest_path, 'build')
|
||||
# also create the destination 'build' directories
|
||||
# if they do not exist
|
||||
run("mkdir -p %s" % build_dir)
|
||||
modules_utils.ensure_dir(build_dir)
|
||||
# run("mkdir -p %s" % build_dir)
|
||||
|
||||
copy_directories(source_path, dest_path)
|
||||
|
||||
|
|
@ -274,7 +277,8 @@ def copy_directories(source_path, dest_path):
|
|||
dest_path -- the destination dir
|
||||
"""
|
||||
|
||||
run("mkdir -p %s" % dest_path)
|
||||
# run("mkdir -p %s" % dest_path)
|
||||
modules_utils.ensure_dir(dest_path)
|
||||
|
||||
file_list = run("ls %s" % source_path).split()
|
||||
for fname in file_list:
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ paths:
|
|||
tools:
|
||||
fabric:
|
||||
home: "customfabric"
|
||||
root: "usr/bin/customfabric"
|
||||
root: "usr/bin"
|
||||
templates:
|
||||
conf: "share/templates/conf"
|
||||
meta: "share/templates/meta"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue