redox/update-packages.sh
Ian Douglas Scott e0401295af
Rename update-all.sh to update-packages.sh; make it optionally allow
a list of packages as arguments
2017-04-08 11:29:41 -07:00

31 lines
610 B
Bash
Executable File

#!/bin/bash
set -e
if [ $# = 0 ]
then
recipes=$(ls -1 recipes)
else
recipes=$@
fi
for recipe in $recipes
do
if [ ! -f "recipes/$recipe/stage.tar" ]
then
echo "$recipe: building..."
./cook.sh $recipe dist
else
oldver=$(./cook.sh $recipe gitversion)
./cook.sh $recipe update
newver=$(./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
fi
fi
done