xref: /freebsd/.cirrus-ci/pkg-install.sh (revision 7899f917b1c0ea178f1d2be0cfb452086d079d23)
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