xref: /freebsd/.cirrus-ci/pkg-install.sh (revision 59c8e88e72633afbc47a4ace0d2170d00d51f7dc)
1#!/bin/sh
2set -e
3
4start_time=$(date +%s)
5pkg install -y "$@" && exit 0
6
7cat <<EOF
8pkg install failed after $(($(date +%s) - $start_time))s
9
10dmesg tail:
11$(dmesg | tail)
12
13trying again
14EOF
15
16start_time=$(date +%s)
17pkg install -y "$@" && exit 0
18
19cat <<EOF
20second pkg install failed after $(($(date +%s) - $start_time))s
21EOF
22exit 1
23