• _common.sh:

    #!/bin/bash
    
    set -xeuo pipefail
    
    if [[ -n "${CHAT_INPUT:-}" ]]; then
       echo "chat input: $CHAT_INPUT"
    fi
    
    _begin() {
        echo -e "section_start:${1:-$(date +%s)}:chat_reply\r\033[0K"
    }
    
    _end() {
        echo -e "section_end:${1:-$(date +%s)}:chat_reply\r\033[0K"
    }
    
    trap _end ERR
    
    begin_time="$(date +%s)"
    export begin_time
    return_code=0
    export return_code
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment