Created
May 15, 2015 00:29
-
-
Save treehouse-su/4cb012e95a1d5ca31848 to your computer and use it in GitHub Desktop.
yoctopuce temp OPK script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# configure pirateship image | |
sudo pirateship rename temper | |
sudo pirateship adapter pirate.sh/ip "" none | |
sudo ifdown wlan0 | |
sudo ifup wlan0 | |
# install opk drivers | |
# NOTE: must manually copy phant 'keys_*.json' file to /boot directory | |
cd /root | |
git clone https://github.com/open-eio/opk-phant-json.git | |
git clone https://github.com/open-eio/opk-wrap.git | |
git clone --recursive https://github.com/treehouse-su/opk-yoctopuce-temp.git | |
# jack in the box | |
cd `dirname "$0"` | |
mv $0 autoran.sh | |
touch $0 | |
chmod 755 $0 | |
# regular autorun.sh | |
echo '#!/bin/sh' > $0 | |
echo '' >> $0 | |
echo 'cd `dirname "$0"`' >> $0 | |
echo '# note: "-n10" refers to the number of seconds between commands. should be > 9 seconds for phant.' >> $0 | |
echo 'watch -n10 "/root/opk-yoctopuce-temp/pull | /root/opk-wrap/wrap -s JSON -k temp | /root/opk-phant-json/push"' >> $0 | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment