From d86cf60b063930fc7ab1c2ab2917350fa55b50b3 Mon Sep 17 00:00:00 2001 From: Dave Conway-Jones Date: Wed, 29 Mar 2017 17:01:53 +0100 Subject: [PATCH] bump sensortag pre-req --- hardware/sensorTag/package.json | 4 ++-- hardware/sensorTag/scripts/checkplatform.js | 25 +++++++++++---------- hardware/sensorTag/scripts/pibt.sh | 3 +-- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/hardware/sensorTag/package.json b/hardware/sensorTag/package.json index 356cf909..cee98612 100644 --- a/hardware/sensorTag/package.json +++ b/hardware/sensorTag/package.json @@ -1,7 +1,7 @@ { "name": "node-red-node-sensortag", "description": "A Node-RED node to read data from a TI SensorTag", - "version": "0.0.18", + "version": "0.0.19", "keywords": [ "node-red", "sensortag", @@ -9,7 +9,7 @@ "Ti CC2541" ], "dependencies": { - "sensortag": "~1.2.0" + "sensortag": "~1.3.0" }, "scripts" : { "postinstall" : "node scripts/checkplatform.js pibt.sh" diff --git a/hardware/sensorTag/scripts/checkplatform.js b/hardware/sensorTag/scripts/checkplatform.js index 59b8cf1e..abd58cb3 100644 --- a/hardware/sensorTag/scripts/checkplatform.js +++ b/hardware/sensorTag/scripts/checkplatform.js @@ -1,17 +1,18 @@ var spawn = require('child_process').spawn; if (process.argv.length === 3) { - var command = process.argv[2]; + var command = process.argv[2]; - if (process.platform === 'linux') { - var dir = __dirname; - var script = spawn(dir + "/" + command); - script.on('close',function(code){ - process.exit(code); - }); - } else { - process.exit(0); - } + if (process.platform === 'linux') { + var dir = __dirname; + var script = spawn(dir + "/" + command); + script.on('close',function(code) { + process.exit(code); + }); + } + else { + process.exit(0); + } } else { - process.exit(0); -} \ No newline at end of file + process.exit(0); +} diff --git a/hardware/sensorTag/scripts/pibt.sh b/hardware/sensorTag/scripts/pibt.sh index d4acebbc..9564459d 100755 --- a/hardware/sensorTag/scripts/pibt.sh +++ b/hardware/sensorTag/scripts/pibt.sh @@ -1,4 +1,3 @@ #!/bin/bash #sudo apt-get install libbluetooth-dev libudev-dev pi-bluetooth - sudo setcap cap_net_raw+eip $(eval readlink -f `which node`) - +sudo setcap cap_net_raw+eip $(eval readlink -f `which node`)