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