From bc93c9480c09bbf77ef4076319ab6c75570301af Mon Sep 17 00:00:00 2001 From: Grant Slater Date: Fri, 1 Nov 2024 18:51:26 +0000 Subject: [PATCH] planet: do not keep previous planet around. --- cookbooks/planet/templates/default/planet-update.erb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cookbooks/planet/templates/default/planet-update.erb b/cookbooks/planet/templates/default/planet-update.erb index 73a778bba..fbfc6592f 100644 --- a/cookbooks/planet/templates/default/planet-update.erb +++ b/cookbooks/planet/templates/default/planet-update.erb @@ -11,11 +11,14 @@ PLANETPREV="${PLANETDIR}/planet-previous.${SUFFIX}" PLANETCURR="${PLANETDIR}/planet.${SUFFIX}" PLANETNEW="${PLANETDIR}/planet-new.${SUFFIX}" +rm -f "$PLANETPREV" + pyosmium-up-to-date -vvv -o "$PLANETNEW" "$PLANETCURR" retval=$? while [ $retval -eq 1 ]; do mv "$PLANETCURR" "$PLANETPREV" + rm -f "$PLANETPREV" mv "$PLANETNEW" "$PLANETCURR" pyosmium-up-to-date -vvv -o "$PLANETNEW" "$PLANETCURR" retval=$? @@ -28,4 +31,5 @@ fi # cleanup mv "$PLANETCURR" "$PLANETPREV" +rm -f "$PLANETPREV" mv "$PLANETNEW" "$PLANETCURR" -- 2.39.5