Skip to content
Snippets Groups Projects
Commit 33f662cb authored by Jeremy Soller's avatar Jeremy Soller Committed by GitHub
Browse files

Merge pull request #5 from ids1024/update-all

Add update-all.sh script to rebuild only out of date packages
parents 3e672562 8b4c56b0
No related branches found
No related tags found
No related merge requests found
...@@ -101,6 +101,14 @@ function op { ...@@ -101,6 +101,14 @@ function op {
fi fi
popd > /dev/null popd > /dev/null
;; ;;
gitversion)
if [ -d build/.git ]
then
echo "$(op $1 version)-$(git -C build rev-parse --short HEAD)"
else
op $1 version
fi
;;
update) update)
pushd build > /dev/null pushd build > /dev/null
skip="0" skip="0"
...@@ -215,6 +223,7 @@ then ...@@ -215,6 +223,7 @@ then
done done
else else
echo "cook.sh: recipe '$1' not found" >&2 echo "cook.sh: recipe '$1' not found" >&2
exit 1
fi fi
else else
usage "{package}" usage "{package}"
......
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment