diff --git a/docs/kickstart/module/apply_recipe.md b/docs/kickstart/module/apply_recipe.md new file mode 100644 index 0000000..430bed1 --- /dev/null +++ b/docs/kickstart/module/apply_recipe.md @@ -0,0 +1,11 @@ +# kickstart.module.apply_recipe module_name recipe_name + +Apply `recipe_name` from `module_name`. +`module_name` is the name of the module under the `modules` folder. +`recipe_name` is the name of the recipe under the `modules/module_name/recipes/recipe_name.sh`, without the .sh + +### Example + +```bash +$ kickstart.module.apply_recipe kickstart-baseline gcc +``` diff --git a/docs/kickstart/module/apply_role.md b/docs/kickstart/module/apply_role.md new file mode 100644 index 0000000..2da0432 --- /dev/null +++ b/docs/kickstart/module/apply_role.md @@ -0,0 +1,11 @@ +# kickstart.module.apply_role module_name role_name + +Apply `role_name` from `module_name`. +`module_name` is the name of the module under the `modules` folder. +`role_name` is the name of the role under the `modules/module_name/roles/role_name.sh`, without the .sh + +### Example + +```bash +$ kickstart.module.apply_role kickstart-baseline haskell +``` diff --git a/kickstart/recipes/kickstart/module.sh b/kickstart/recipes/kickstart/module.sh new file mode 100644 index 0000000..0f74d0b --- /dev/null +++ b/kickstart/recipes/kickstart/module.sh @@ -0,0 +1,14 @@ +kickstart.module.apply_role() { + kickstart.module.apply_ $1 $2 roles +} + +kickstart.module.apply_recipe() { + kickstart.module.apply_ $1 $2 recipes +} + +kickstart.module.apply_() { + local cur_dir=`pwd`; + cd modules/$1 + source $3/$2.sh + cd $cur_dir +}