[buildbot] scripts: remove unused expire.sh

LEDE Commits lede-commits at lists.infradead.org
Thu Nov 16 03:48:45 PST 2023


ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/2d247f89c26267a18a4a86bce8643c854e362891

commit 2d247f89c26267a18a4a86bce8643c854e362891
Author: Thibaut VARÈNE <hacks at slashdirt.org>
AuthorDate: Wed Nov 15 13:45:18 2023 +0100

    scripts: remove unused expire.sh
    
    Signed-off-by: Thibaut VARÈNE <hacks at slashdirt.org>
---
 scripts/expire.sh | 27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/scripts/expire.sh b/scripts/expire.sh
deleted file mode 100755
index e965f84..0000000
--- a/scripts/expire.sh
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-
-max_lifetime="$1"
-
-tree_birth="$(date --reference=tree.timestamp +%s 2>/dev/null)"
-tree_age="$(( $(date +%s) - ${tree_birth:-0} ))"
-
-if [ $max_lifetime -le 0 ]; then
-	echo "No tree expiry set."
-
-elif [ $tree_age -ge $max_lifetime ]; then
-	echo "The build tree reached its maximum lifetime, cleaning up."
-	find . -mindepth 1 -maxdepth 1 -print0 | xargs -r -0 rm -vrf | while read entry; do
-		printf "."
-	done
-
-	mkdir build
-
-	echo ""
-	echo "Writing new timestamp"
-	date +%s > tree.timestamp
-
-else
-	echo "The build tree is not expired."
-fi
-
-exit 0




More information about the lede-commits mailing list