From 935007dd869d2b96cd73117a4e41c56ef8cb4978 Mon Sep 17 00:00:00 2001 From: 3wc <3wc.git@doesthisthing.work> Date: Mon, 3 May 2021 03:21:59 +0200 Subject: [PATCH] Improve `recipe new` subcommand --- abra | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/abra b/abra index 291f478..1ed74e8 100755 --- a/abra +++ b/abra @@ -1881,6 +1881,7 @@ Create a new application recipe called ." sub_recipe_create() { recipe="$abra__recipe_" + recipe_kebab="${recipe//-/_}" recipe_dir="$ABRA_DIR/apps/$recipe" @@ -1894,7 +1895,11 @@ sub_recipe_create() { cd "$recipe_dir" || error "Failed to create directory '$recipe_dir'" - rm -rf .git .gitea + rm -rf .git .gitea .drone.yml + + sed -i "s/\${REPO_NAME}/$recipe/g" README.md + sed -i "s/\${REPO_NAME_TITLE}/$recipe/g" README.md + sed -i "s/\${REPO_NAME_KEBAB}/$recipe_kebab/g" .env.sample success "New recipe created in '$recipe_dir', happy hacking! 👌" }