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