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