Add method to create summary toml

This commit is contained in:
Jeremy Soller 2017-05-07 15:47:42 -06:00
parent 207c3cb3c5
commit 282bba2655
3 changed files with 14 additions and 9 deletions

8
all.sh
View File

@ -1,8 +0,0 @@
#!/bin/bash
set -e
for recipe in `ls -1 recipes`
do
./cook.sh $recipe $*
done

13
cook.sh
View File

@ -222,7 +222,18 @@ function op {
if [ -n "$1" ]
then
if [ -d "$ROOT/recipes/$1" ]
if [ "$1" = "repo" ]
then
echo -e "\033[01;38;5;215mcook - repo\033[0m" >&2
echo "[packages]" > "$REPO.toml"
for toml in "$REPO/"*".toml"
do
package="$(basename "$toml" .toml)"
version="$(grep version "$toml" | cut -d '=' -f2-)"
echo "$package =$version" >> "$REPO.toml"
done
elif [ -d "$ROOT/recipes/$1" ]
then
cd "$ROOT/recipes/$1"
source recipe.sh

View File

@ -36,3 +36,5 @@ for recipe in $publish
do
./cook.sh $recipe publish
done
./cook.sh repo