Log installer output, addresses #721

This commit is contained in:
Bill Zimmerman 2020-12-02 22:43:36 +01:00 committed by GitHub
parent 30ed6b9026
commit eb7c50be26
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -51,6 +51,11 @@ readonly ANSI_RASPBERRY="\033[0;35m"
readonly ANSI_ERROR="\033[1;37;41m"
readonly ANSI_RESET="\033[m"
# Log output
readonly LOGFILE_PATH="/tmp"
exec > >(tee -i $LOGFILE_PATH/raspap_install.log)
exec 2>&1
# Fetch latest release from GitHub API
readonly RASPAP_LATEST=$(curl -s "https://api.github.com/repos/$repo/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")' )