new logging
This commit is contained in:
+5
-3
@@ -1,5 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Simple new installer
|
# Simple new installer
|
||||||
|
exec > >(tee -i installation.log)
|
||||||
|
exec 2>&1
|
||||||
HOME=/home/pi
|
HOME=/home/pi
|
||||||
USER=pi
|
USER=pi
|
||||||
branch=sqlite
|
branch=sqlite
|
||||||
@@ -8,11 +10,11 @@ if ! which git &> /dev/null;then
|
|||||||
sudo apt -y install git
|
sudo apt -y install git
|
||||||
fi
|
fi
|
||||||
git clone -b ${branch} https://github.com/mcguirepr89/BirdNET-Pi.git ${HOME}/BirdNET-Pi &&
|
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
|
if [ ${PIPESTATUS[0]} -eq 0 ];then
|
||||||
echo "Installation completed successfully" >> installation.log
|
echo "Installation completed successfully"
|
||||||
sudo reboot
|
sudo reboot
|
||||||
else
|
else
|
||||||
echo "The installation exited unsuccessfully." >> installation.log
|
echo "The installation exited unsuccessfully."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user