diff --git a/hooks/post-commit b/hooks/post-commit index 8809ae8..38c912c 100644 --- a/hooks/post-commit +++ b/hooks/post-commit @@ -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"