diff --git a/scripts/category.sh b/scripts/category.sh new file mode 100755 index 0000000..faca203 --- /dev/null +++ b/scripts/category.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +if [ -z "$1" ] || [ -z "$2" ] +then + echo "Build or clean all recipe directories in a category" >&2 + echo Usage: $0 "" "" >&2 + echo "" can be f, r, c, u, or combinations that \"make\" understands >&2 + exit 1 +fi + +set -x + +action="${1#-}" + +for recipe in `find cookbook/recipes/"$2" -name "recipe.*"` +do + recipe_folder=`dirname "$recipe"` + recipe_name=`basename "$recipe_folder"` + make "$action"."$recipe_name" +done \ No newline at end of file