make echo_info work if no tlsa is configured

the echo_info function is defined in the timestamp file
which should be sourced before using any function from there.
This commit is contained in:
Benedikt Trefzer
2021-12-18 12:41:26 +01:00
parent 971d2d5454
commit 596f084eff

View File

@@ -37,6 +37,10 @@
# address: info@mabulous.com
#
DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
. "$DIR/timestamping"
TSA0_URL=$(git config timestamping.tsa0.url)
if [ -z "$TSA0_URL" ]; then
# Do nothing if TSA0 has not been configured.
@@ -44,10 +48,6 @@ if [ -z "$TSA0_URL" ]; then
exit 0
fi
DIR="${BASH_SOURCE%/*}"
if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
. "$DIR/timestamping"
extended_exit_trap() {
local EXIT_CODE="$?"
log "extended_exit_trap $EXIT_CODE"