bugfix for set -euo

This commit is contained in:
Jeffrey Paul 2025-03-29 00:34:21 -07:00
parent 932f2b2d89
commit f2ddbfbb1b

View File

@ -2,10 +2,12 @@
set -euo pipefail
set -x
function apt_update_if_stale () {
[ -z "$(find /var/lib/apt/lists -type f -mmin -30 2>/dev/null)" ] && apt-get update
if ! find /var/lib/apt/lists -type f -mmin -30 | grep -q .; then
apt-get update
else
echo "Skipping apt update, metadata is fresh." > /dev/stderr
fi
}
function main () {