end-to-end/lib/lib.sh

21 lines
332 B
Bash
Raw Normal View History

2024-01-24 00:03:34 +01:00
#!/bin/bash
# Copyright 2024 The Forgejo Authors
# SPDX-License-Identifier: MIT
if ${VERBOSE:-false} ; then
set -ex
PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: '
else
set -e
fi
2024-01-24 00:03:34 +01:00
set -o pipefail
export DEBIAN_FRONTEND=noninteractive
if test $(id -u) != 0 ; then
SUDO=sudo
fi
IP=$(hostname -I | cut -f1 -d' ')