Fix exporting config values, exit on error & print all commands in setup scripts

This commit is contained in:
Satu Koskinen 2022-10-22 14:40:41 +03:00
parent a1eccc0c3d
commit 98909ff51f
5 changed files with 9 additions and 4 deletions

View File

@ -27,7 +27,7 @@ echo
echo "### Install some developer tools"
echo
sudo apt-get update && sudo apt-get install -y build-essential
sudo apt-get update && sudo apt-get install -y build-essential python3-pip
# Setup audio
echo

View File

@ -1,5 +1,5 @@
#!/bin/bash
CONFIG_FILE=$1
CONFIG_FILE=/boot/hydrophonitor/configuration/hydrophonitor-config.txt
export $(grep -v '^#' $CONFIG_FILE | tr -d '[:space:]' | xargs -d '\n')

View File

@ -1,5 +1,7 @@
#!/bin/bash
set -ex
echo "Setting up audio recording"
# Install packages

View File

@ -1,9 +1,10 @@
#!/bin/sh
set -ex
echo "Setting up GPS recording"
sudo apt-get update && sudo apt-get install -y \
gpsd gpsd-clients
sudo apt-get update && sudo apt-get install -y gpsd gpsd-clients
sudo pip install -r /home/pi/hydrophonitor/gps-logger/requirements.txt

View File

@ -1,5 +1,7 @@
#!/bin/sh
set -ex
echo "Setting up depth recording"
# Enable i2c bus on Raspberry Pi