summaryrefslogtreecommitdiff
path: root/boot/boot.sh
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-07-11 09:38:42 -0700
committerschneefux <schneefux+commit@schneefux.xyz>2014-07-11 09:38:42 -0700
commit43eebc44166da07388a2e932d1234090fda957ec (patch)
treed5cc1793a0b6269df71cce2b58ea099c60e4e455 /boot/boot.sh
parentea082f844a6748141aa61143421e4e9d0cc19bda (diff)
parent8a5e5ed385a5c467260c2f1b20816a66cebfc1c6 (diff)
downloadjasper-client-43eebc44166da07388a2e932d1234090fda957ec.tar.gz
jasper-client-43eebc44166da07388a2e932d1234090fda957ec.zip
Merge pull request #100 from astahlman/master
Platform independent audio output. Stop hardcoding /home/jasper.
Diffstat (limited to 'boot/boot.sh')
-rwxr-xr-xboot/boot.sh15
1 files changed, 13 insertions, 2 deletions
diff --git a/boot/boot.sh b/boot/boot.sh
index 5ea1b3d..e712c0d 100755
--- a/boot/boot.sh
+++ b/boot/boot.sh
@@ -1,6 +1,17 @@
-cd /home/pi/jasper/boot/
+#!/bin/bash
+if [[ -z "$JASPER_HOME" ]]; then
+ if [[ -d "/home/pi" ]]; then
+ JASPER_HOME="/home/pi"
+ export JASPER_HOME;
+ else
+ echo "Error: \$JASPER_HOME is not set."
+ exit 0;
+ fi
+fi
+
+cd $JASPER_HOME/jasper/boot
LD_LIBRARY_PATH="/usr/local/lib"
export LD_LIBRARY_PATH
PATH=$PATH:/usr/local/lib/
export PATH
-python boot.py & \ No newline at end of file
+python boot.py &