mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-06-20 20:04:19 +08:00
Add update-all.sh script to rebuild only out of date packages
This commit is contained in:
parent
7baa834c40
commit
3bd2f7cfd6
8
cook.sh
8
cook.sh
@ -101,6 +101,14 @@ function op {
|
||||
fi
|
||||
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)
|
||||
pushd build > /dev/null
|
||||
skip="0"
|
||||
|
||||
23
update-all.sh
Executable file
23
update-all.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
for recipe in `ls -1 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
|
||||
Loading…
Reference in New Issue
Block a user