1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00
freebsd/.cirrus-ci/pkg-install.sh
Ed Maste b00e7ce403 Cirrus-CI: add some timing info on pkg install failure
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 77013d11e6)
2022-02-09 12:39:50 -05:00

23 lines
326 B
Bash

#!/bin/sh
set -e
start_time=$(date +%s)
pkg install -y "$@" && exit 0
cat <<EOF
pkg install failed after $(($(date +%s) - $start_time))s
dmesg tail:
$(dmesg | tail)
trying again
EOF
start_time=$(date +%s)
pkg install -y "$@" && exit 0
cat <<EOF
second pkg install failed after $(($(date +%s) - $start_time))s
EOF
exit 1