dotfiles/bin/init-template

13 lines
247 B
Plaintext
Raw Normal View History

2021-01-13 17:10:01 +00:00
#!/usr/bin/env bash
set -eo pipefail
TEMPLATES_DIR="$HOME/templates"
while [[ ! -a "$TEMPLATES_DIR/$TEMPLATE/cookiecutter.json" ]]
do
TEMPLATE="$TEMPLATE/$(ls "$TEMPLATES_DIR/$TEMPLATE" | fzf)"
done
cookiecutter "$TEMPLATES_DIR/$TEMPLATE"