feature: Changes build script to only rebuild upon changes.
This commit is contained in:
parent
abb2f82682
commit
befbab002a
3 changed files with 14 additions and 3 deletions
12
buildall.sh
12
buildall.sh
|
@ -1,12 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
mkdir meta > /dev/null 2> /dev/null
|
||||
|
||||
for FILE in kitteh-node-*/*; do
|
||||
FILE_NO_EXTENSION="${FILE/".nix"/""}"
|
||||
|
||||
if [ ! -f "out/$FILE_NO_EXTENSION.vma.zst" ] || git diff --exit-code $FILE; then
|
||||
# Hacky!
|
||||
mkdir -p meta/$FILE
|
||||
rm -rf meta/$FILE
|
||||
|
||||
sha512sum $FILE > /tmp/kt-clusterbuild_sha512sum
|
||||
|
||||
if [ ! -f "meta/$FILE.sha" ] || ! diff -q "/tmp/kt-clusterbuild_sha512sum" "meta/$FILE.sha" > /dev/null; then
|
||||
./build.sh $FILE_NO_EXTENSION
|
||||
else
|
||||
echo "Not building '$FILE_NO_EXTENSION'."
|
||||
fi
|
||||
|
||||
mv "/tmp/kt-clusterbuild_sha512sum" "meta/$FILE.sha"
|
||||
done
|
||||
|
||||
echo "Done building."
|
Reference in a new issue