Skip to content
Snippets Groups Projects
Unverified Commit 936511ae authored by Ian Douglas Scott's avatar Ian Douglas Scott
Browse files

Actually, don't rely on recipe being commited to git

parent 749c00d5
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
shopt -s nullglob
source config.sh source config.sh
...@@ -39,8 +40,8 @@ do ...@@ -39,8 +40,8 @@ do
else else
TIME_BUILD="$(find recipes/$recipe/build -type f -not -path '*/.git*' -printf "%Ts\n" | sort -nr | head -n 1)" TIME_BUILD="$(find recipes/$recipe/build -type f -not -path '*/.git*' -printf "%Ts\n" | sort -nr | head -n 1)"
TIME_STAGE="$(stat -c "%Y" recipes/$recipe/stage.tar)" TIME_STAGE="$(stat -c "%Y" recipes/$recipe/stage.tar)"
TIME_RECIPE="$(find $(git ls-tree -r --name-only HEAD recipes/$recipe) -printf '%Ts\n' | sort -nr | head -n 1)" TIME_RECIPE="$(find recipes/$recipe/{recipe.sh,*.patch} -printf '%Ts\n' | sort -nr | head -n 1)"
if [ "$TIME_BUILD" -gt "$TIME_STAGE" -o "$TIME_RECIPE" -gt "$TIME_STAGE" ] if [ "$TIME_BUILD" -gt "$TIME_STAGE" -o "$TIME_RECIPE" -gt "$TIME_STAGE" ]
then then
echo -e "\033[01;38;5;155mrepo - rebuilding $recipe\033[0m" >&2 echo -e "\033[01;38;5;155mrepo - rebuilding $recipe\033[0m" >&2
./cook.sh "$recipe" untar unstage update build stage tar ./cook.sh "$recipe" untar unstage update build stage tar
......
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