Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix broken init script
  • Loading branch information
EsGeh authored and EsGeh committed Nov 25, 2019
1 parent 0187cf8 commit 1fa416f
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions scripts/init.py
Expand Up @@ -43,10 +43,6 @@ def create_dirs( config ):
create_dir(
BASE_DIR / config['OUTPUT_DIR']
)
copy_dir(
BASE_DIR / config['DEPENDENCIES_DIR'] / 'eoa-publication-model/examples',
BASE_DIR / config['INPUT_DIR'] / 'example'
)

def install_git_dep(
repo_name,
Expand All @@ -56,10 +52,12 @@ def install_git_dep(
init_script = None,
):
DEP_DIR = BASE_DIR / config['DEPENDENCIES_DIR']
if not((DEP_DIR / repo_name).exists()) or force:
# remove repo, if necessary:
if force:
if (DEP_DIR / repo_name).exists():
shutil.rmtree( DEP_DIR / repo_name )

if not((DEP_DIR / repo_name).exists()):
subprocess.check_call(
["git", "clone", repo_uri, DEP_DIR / repo_name]
)
Expand Down Expand Up @@ -128,4 +126,10 @@ def install_git_dep(
env = config,
)

# copy example publication to $INPUT_DIR
copy_dir(
BASE_DIR / config['DEPENDENCIES_DIR'] / 'eoa-publication-model/examples',
BASE_DIR / config['INPUT_DIR'] / 'example'
)

print( "done." )

0 comments on commit 1fa416f

Please sign in to comment.