summaryrefslogtreecommitdiff
path: root/boot/boot.sh
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-06-08 20:39:35 -0700
committerschneefux <schneefux+commit@schneefux.xyz>2014-06-21 12:39:11 -0700
commit84a92e5327997815488276021e5498f7681ab2d7 (patch)
tree972b154650d9a4ae3bd0a77b1ace36d403457053 /boot/boot.sh
parent1744368ac1889fe0767f04d55e8f928553c8db1c (diff)
downloadjasper-client-84a92e5327997815488276021e5498f7681ab2d7.tar.gz
jasper-client-84a92e5327997815488276021e5498f7681ab2d7.zip
Stop hardcoding /home/jasper and abstract out mic.say for multiplatform support
Diffstat (limited to 'boot/boot.sh')
-rwxr-xr-xboot/boot.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/boot/boot.sh b/boot/boot.sh
index 5ea1b3d..927b4b2 100755
--- a/boot/boot.sh
+++ b/boot/boot.sh
@@ -1,6 +1,16 @@
-cd /home/pi/jasper/boot/
+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 &