-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart
More file actions
executable file
·35 lines (24 loc) · 806 Bytes
/
start
File metadata and controls
executable file
·35 lines (24 loc) · 806 Bytes
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
#!/bin/bash
#rm -rf freeboard
if ls freeboard >> /dev/null ; then echo found freeboard directory... not running git clone
else
git clone https://github.com/Freeboard/freeboard.git
fi
#exit
cp widget.rest.button.js freeboard/plugins/thirdparty/
ls freeboard/plugins/thirdparty/widget.rest.button.js
cp example.json freeboard/example.json
echo -e "\n<script>head.js('plugins/thirdparty/widget.rest.button.js',()=>{})</script>" >> freeboard/index.html
#start
x-terminal-emulator -e python -m SimpleHTTPServer 8888 &
sleep 1
if [ $(uname) = "Linux" ]
then
xdg-open freeboard/index.html
xdg-open http://localhost:8888/freeboard/index.html?load=example.json
else
open freeboard/index.html
open http://localhost:8888/freeboard/index.html?load=example.json
fi
sleep 600
#pkill x-terminal-emulator