From d553dbc09dafa31579741608642dd2156c933934 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Sat, 10 Oct 2020 20:09:30 -0600 Subject: [PATCH] Prevent rebuilding pkgar archives --- repo.sh | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/repo.sh b/repo.sh index 8185f2b4b..92aa673c2 100755 --- a/repo.sh +++ b/repo.sh @@ -26,8 +26,22 @@ do then target/release/cook "$recipe" - echo -e "\033[01;38;5;155mrepo - legacy tar for $recipe\033[0m" >&2 - ./cook.sh "$recipe" tar + if [ ! -f "recipes/$recipe/stage.tar.gz" ] + then + echo -e "\033[01;38;5;155mrepo - legacy packaging $recipe\033[0m" >&2 + ./cook.sh "$recipe" tar $DEBUG + else + TIME_PKG="$($STAT -c "%Y" recipes/$recipe/stage.pkgar)" + TIME_STAGE="$($STAT -c "%Y" recipes/$recipe/stage.tar.gz)" + if [ "$TIME_PKG" -gt "$TIME_STAGE" ] + then + echo -e "\033[01;38;5;155mrepo - legacy repackaging $recipe\033[0m" >&2 + ./cook.sh "$recipe" untar tar $DEBUG + fi + fi + + # Match pkgar and tar time + touch --no-create --reference="recipes/$recipe/stage.tar.gz" "recipes/$recipe/stage.pkgar" continue fi