diff options
| author | Dennis Fink | 2018-04-14 17:23:31 +0200 |
|---|---|---|
| committer | Dennis Fink | 2018-04-14 17:23:31 +0200 |
| commit | e1093efd089566a123d5c4738818fa4297435025 (patch) | |
| tree | 29aec3317e09c0e4e37a5a6471c78c3ee6f05846 | |
| parent | 4ff26de47b36306c741762c3a08cfadcb7464475 (diff) | |
| download | patternutils-e1093efd089566a123d5c4738818fa4297435025.tar.gz patternutils-e1093efd089566a123d5c4738818fa4297435025.zip | |
Add init subcommand to patterncfg
| -rw-r--r-- | patternutils/commands/patterncfg.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/patternutils/commands/patterncfg.py b/patternutils/commands/patterncfg.py index ea51f5c..7c930da 100644 --- a/patternutils/commands/patterncfg.py +++ b/patternutils/commands/patterncfg.py @@ -11,6 +11,12 @@ def patterncfg() -> None: pass +@patterncfg.command(name='init', help='initialize config folders') +def init() -> None: + for dir in ['pmatch', 'tmv', 'targs']: + os.makedirs(os.path.join(config.CONFIG_PATH, dir), exist_ok=True) + + @patterncfg.command(name='list', help='list all patternutils template files') def list() -> None: for d in os.listdir(config.CONFIG_PATH): |
