2021-06-02 14:42:57 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
2021-06-02 17:08:29 +00:00
|
|
|
start_time=$(date +%s)
|
2021-06-02 14:42:57 +00:00
|
|
|
pkg install -y "$@" && exit 0
|
|
|
|
|
|
|
|
cat <<EOF
|
2021-06-02 17:08:29 +00:00
|
|
|
pkg install failed after $(($(date +%s) - $start_time))s
|
2021-06-02 14:42:57 +00:00
|
|
|
|
|
|
|
dmesg tail:
|
|
|
|
$(dmesg | tail)
|
|
|
|
|
|
|
|
trying again
|
|
|
|
EOF
|
|
|
|
|
2021-06-02 17:08:29 +00:00
|
|
|
start_time=$(date +%s)
|
|
|
|
pkg install -y "$@" && exit 0
|
|
|
|
|
|
|
|
cat <<EOF
|
|
|
|
second pkg install failed after $(($(date +%s) - $start_time))s
|
|
|
|
EOF
|
|
|
|
exit 1
|