Merge pull request #7 from ids1024/update-all

update-packages.sh improvements
This commit is contained in:
Jeremy Soller 2017-04-09 07:22:03 -06:00 committed by GitHub
commit 1efcd84aea
2 changed files with 8 additions and 4 deletions

View File

@ -33,7 +33,11 @@ function usage {
}
function op {
echo -e "\033[01;38;5;215mcook - $1 $2\033[0m" >&2
if [ ! "$COOK_QUIET" = "1" ]
then
echo -e "\033[01;38;5;215mcook - $1 $2\033[0m" >&2
fi
case "$2" in
dist)
op $1 fetch

View File

@ -18,15 +18,15 @@ do
./cook.sh $recipe dist
publish="${publish} $recipe"
else
oldver=$(./cook.sh $recipe gitversion)
oldver=$(COOK_QUIET=1 ./cook.sh $recipe gitversion)
./cook.sh $recipe fetch
newver=$(./cook.sh $recipe gitversion)
newver=$(COOK_QUIET=1 ./cook.sh $recipe gitversion)
if [ "$oldver" = "$newver" ]
then
echo "$recipe: up to date (version $newver)."
else
echo "$recipe: updating $oldver -> $newver..."
./cook.sh $recipe dist
./cook.sh $recipe unstage untar dist
publish="${publish} $recipe"
fi
fi