upgrades; move SUDO and verbosity control to lib
This commit is contained in:
parent
bf6ece0f52
commit
8347d9e040
2 changed files with 13 additions and 19 deletions
10
lib/lib.sh
10
lib/lib.sh
|
@ -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' ')
|
||||
|
|
Loading…
Add table
Reference in a new issue