bugfix for set -euo
This commit is contained in:
parent
932f2b2d89
commit
f2ddbfbb1b
@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
function apt_update_if_stale () {
|
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 () {
|
function main () {
|
||||||
|
Loading…
Reference in New Issue
Block a user