Skip to content

Instantly share code, notes, and snippets.

@chrowe
Forked from treehouse-su/autorun.sh
Last active August 29, 2015 14:26
Show Gist options
  • Save chrowe/d4db9db779fed9ce8a26 to your computer and use it in GitHub Desktop.
Save chrowe/d4db9db779fed9ce8a26 to your computer and use it in GitHub Desktop.
temper1 OPK script
#!/bin/sh
# configure pirateship image
sudo pirateship rename temper
sudo pirateship adapter pirate.sh/ip "" none
# 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 https://github.com/openpipekit/opk-temper1-cli.git
opk-temper1-cli/install
# 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-temper1-cli/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