upgrades; move SUDO and verbosity control to lib

This commit is contained in:
Twenty Panda 2024-03-15 13:17:01 +07:00 committed by p
parent bf6ece0f52
commit 8347d9e040
2 changed files with 13 additions and 19 deletions

View file

@ -2,7 +2,13 @@
# Copyright 2024 The Forgejo Authors
# SPDX-License-Identifier: MIT
set -e
if ${VERBOSE:-false} ; then
set -ex
PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: '
else
set -e
fi
set -o pipefail
export DEBIAN_FRONTEND=noninteractive
@ -11,4 +17,4 @@ if test $(id -u) != 0 ; then
SUDO=sudo
fi
PS4='${BASH_SOURCE[0]}:$LINENO: ${FUNCNAME[0]}: '
IP=$(hostname -I | cut -f1 -d' ')