From ebe39de283f57d36a990a541987ece057e599c1f Mon Sep 17 00:00:00 2001 From: mcguirepr89 Date: Fri, 18 Feb 2022 14:33:53 -0500 Subject: [PATCH] new logging --- newinstaller.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/newinstaller.sh b/newinstaller.sh index 4c507dd..fd98dca 100644 --- a/newinstaller.sh +++ b/newinstaller.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash # Simple new installer +exec > >(tee -i installation.log) +exec 2>&1 HOME=/home/pi USER=pi branch=sqlite @@ -8,11 +10,11 @@ if ! which git &> /dev/null;then sudo apt -y install git fi git clone -b ${branch} https://github.com/mcguirepr89/BirdNET-Pi.git ${HOME}/BirdNET-Pi && -${HOME}/BirdNET-Pi/scripts/install_birdnet.sh | tee -a installation.log 2>&1 +${HOME}/BirdNET-Pi/scripts/install_birdnet.sh if [ ${PIPESTATUS[0]} -eq 0 ];then - echo "Installation completed successfully" >> installation.log + echo "Installation completed successfully" sudo reboot else - echo "The installation exited unsuccessfully." >> installation.log + echo "The installation exited unsuccessfully." exit 1 fi