Improve recipe new subcommand

This commit is contained in:
3wc 2021-05-03 03:21:59 +02:00
parent 2cd1d053f0
commit 935007dd86

7
abra
View File

@ -1881,6 +1881,7 @@ Create a new application recipe called <recipe>."
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! 👌"
}