app.py: Ensure an elements sub-dir is created upon project initialisation

Problem

Currently, when invoking the bst init command to initialise a project, we automatically generate a project.conf with the following:

# Unique project name
name: test

# Required BuildStream format version
format-version: BST_FORMAT_VERSION

# Subdirectory where elements are stored
element-path: elements

Executing ls in the new project's root directory shows only the project.conf file.

Seeing as we specify element-path: elements in the project.conf file, it makes sense to automatically create an elements/ sub-directory within the project root.

This patch does just that.

Result

 jamesennis/~/bst_projects/$: mkdir test && cd test
 jamesennis/~/bst_projects/test/$: bst init --project-name test

Created project.conf at: /home/jamesennis/bst_projects/test/project.conf
 jamesennis/~/bst_projects/test/$: ls
elements  project.conf
 jamesennis/~/bst_projects/test/$: cd elements/
Edited by James Ennis

Merge request reports

Loading