aboutsummaryrefslogtreecommitdiff
path: root/files/usr/local/libexec
diff options
context:
space:
mode:
authorCullum Smith <cullum@sacredheartsc.com>2024-07-17 06:45:00 -0400
committerCullum Smith <cullum@sacredheartsc.com>2024-07-17 06:46:22 -0400
commitf036b9c0da685d11e341d61e5aaeb75cac576111 (patch)
tree22b08ae6bb7e83d529fe49fe99ea8da87a8d25a4 /files/usr/local/libexec
parent89cdd1c872694797a8f6f0185be2b2cd3467bfcc (diff)
downloadinfrastructure-f036b9c0da685d11e341d61e5aaeb75cac576111.tar.gz
add pkg_repository hostclass
Diffstat (limited to 'files/usr/local/libexec')
-rw-r--r--files/usr/local/libexec/poudriere-cron.pkg_repository16
1 files changed, 16 insertions, 0 deletions
diff --git a/files/usr/local/libexec/poudriere-cron.pkg_repository b/files/usr/local/libexec/poudriere-cron.pkg_repository
new file mode 100644
index 0000000..f0291ec
--- /dev/null
+++ b/files/usr/local/libexec/poudriere-cron.pkg_repository
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -eu -o pipefail
+
+ports_tree=latest
+
+# update ports tree
+poudriere ports -u -p "$ports_tree" > /dev/null
+
+for jail in "$@"; do
+ poudriere jail -u -j "$jail" > /dev/null
+ poudriere bulk -j "$jail" -f /usr/local/etc/poudriere.d/pkglist -p "$ports_tree" > /dev/null
+done
+
+poudriere distclean -p "$ports_tree" -a -y > /dev/null
+poudriere logclean -N 5 -p "$ports_tree" -y > /dev/null