forked from Nachtzuster/BirdNET-Pi
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinstall_birdnet.sh
More file actions
executable file
·49 lines (37 loc) · 1.31 KB
/
install_birdnet.sh
File metadata and controls
executable file
·49 lines (37 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/usr/bin/env bash
# Install BirdNET script
set -x # Debugging
exec > >(tee -i installation-$(date +%F).txt) 2>&1 # Make log
set -e # exit installation if anything fails
my_dir=$HOME/BirdNET-Pi
export my_dir=$my_dir
cd $my_dir/scripts || exit 1
git log -n 1 --pretty=oneline --no-color --decorate
source install_helpers.sh
if [ "$(uname -m)" != "aarch64" ] && [ "$(uname -m)" != "x86_64" ];then
echo "BirdNET-Pi requires a 64-bit OS.
It looks like your operating system is using $(uname -m),
but would need to be aarch64."
exit 1
fi
#Install/Configure /etc/birdnet/birdnet.conf
./install_config.sh || exit 1
sudo -E HOME=$HOME USER=$USER ./install_services.sh || exit 1
source /etc/birdnet/birdnet.conf
install_birdnet() {
cd ~/BirdNET-Pi || exit 1
echo "Establishing a python virtual environment"
python3 -m venv birdnet
source ./birdnet/bin/activate
pip3 install wheel
get_tf_whl
pip3 install -U -r ./requirements_custom.txt
}
[ -d ${RECS_DIR} ] || mkdir -p ${RECS_DIR} &> /dev/null
install_birdnet
cd $my_dir/scripts || exit 1
# tzlocal.get_localzone() will fail if the Debian specific /etc/timezone is not in sync
CURRENT_TIMEZONE=$(timedatectl show --value --property=Timezone)
[ -f /etc/timezone ] && echo "$CURRENT_TIMEZONE" | sudo tee /etc/timezone > /dev/null
./install_language_label.sh || exit 1
exit 0